package Server.Poker.DGT;


import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Random;

import org.apache.commons.lang.StringUtils;
import org.json.JSONObject;

import Server.Agent.GameDB;
import Server.Model.Base.IRoom;
import Server.Model.Base.IServerUserItem;
import Server.Model.Base.SHMUser;
import Server.Model.Hall.QpGameMgr;
import Server.Model.Hall.dthall;
import club.ClubRedis;
import redis.protocal.DbInfoMgr;
import Server.Poker.Replay.*;

public class DGTZTable extends IRoom {

	int mTableID;
	boolean m_bLocked; // Ã©â€“Â¿Ã¤Â½Â¸Ã§â€¢Â¾Ã©ï¿½ï¿½Ã¥â€ºÂ§Ã§Â¹â€�
	String m_szPassint; // Ã§â‚¬ÂµÃ¥â€”â„¢Ã§Ë†Å“

	int GetTableID() {
		return mTableID;
	};
	public Replay Replay = new Replay();
	

	int m_wBombTime; // Ã©ï¿½ï¿½Ã§Â¨Â¿Ã¨â€žÅ Ã©ï¿½Å Ã¥Â¶â€ Ã¦Å¡Å¸
	int m_bLandScore; // Ã©ï¿½Â¦Ã©Â¢ï¿½Ã¥Â¯Å’Ã©ï¿½â€™Ã¥â€”ËœÃ¦Å¡Å¸
	int m_wOutBombCount; // Ã©ï¿½ï¿½Ã§Â¨Â¿Ã¨â€žÅ Ã©ï¿½ï¿½Ã¦â€°Â®Ã¦Â´Â°
	int m_wFirstUser; // Ã¦Â£Â£Ã¦Â Â§Ã¥Â½Â¨Ã©ï¿½Â¢Ã£â€žÂ¦Ã¥Å¸â€º
	int m_wBankerUser; // Ã¦ï¿½Â´Ã¥â€¹Â«Ã®â€ ï¿½Ã©ï¿½Â¢Ã£â€žÂ¦Ã¥Å¸â€º
	int m_wCurrentUser; // Ã¨Â¤Â°Ã¦â€™Â³Ã¥Â¢Â Ã©ï¿½Å“Ã¢â€¢ï¿½Ã®â€ ï¿½
	int m_bScoreInfo[] = new int[5]; // Ã©ï¿½â„¢Ã®â€šÂ¢Ã¥Å¾Å½Ã¦Â·â€¡Ã¢â€žÆ’Ã¤Â¼â€¦
	int isMingPai[] = new int [5];//Ã¦ËœÂ¯Ã¥ï¿½Â¦Ã¦ËœÅ½Ã§â€°Å’Ã©ËœÂ¶Ã¦Â®Âµ
	int SelectMingPai[] = new int [5];
	int BombMoney[] = new int [5];
	int XiScore[] = new int [5];
	int banktime[] = new int[5];
	int nongmin[] = new int[5];
	int goutuitime[] = new int[5];
	int firstround;
	int jiaogoutui;
	int isjiaogoutui;
	int MingPaiTimes;
	boolean OneVsFour;
	boolean peopleking;
	boolean chongkaiju;
	public String m_vecInputWenZi;
	int m_bMingCard; // 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮好兤捗⑩偓拧脙鈥毭偮Ｃ兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮�
	int m_bCurrentState;  // 脙茠脝鈥櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮っ兤捗⑩偓拧脙鈥毭偮懊兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗⑩偓拧脙鈥毭偮趁兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮⒚兤捗⑩偓拧脙鈥毭偮犆兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
	int m_bCallScoreTimes[] = new int[Constants.DDZ_PLAYER]; // 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗⑩偓拧脙鈥毭偮⒚兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓娄脙鈥毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮∶兤捗⑩偓娄脙鈥毭偮�
	int m_bCallScoreTag[] = new int[Constants.DDZ_PLAYER];  // 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗⑩偓拧脙鈥毭偮⒚兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓娄脙鈥毭偮矫兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮该兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮�
	int m_bScoreTimes[] = new int[Constants.DDZ_PLAYER];  // 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬柯矫兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮∶兤捗⑩偓娄脙鈥毭偮该兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓娄脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮睹兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮∶兤捗⑩偓娄脙鈥毭偮�
	int m_bCallBanker[] = new int[Constants.DDZ_PLAYER];  // 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗⑩偓拧脙鈥毭偮⒚兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮懊兤捗⑩偓娄脙鈥毭偮久兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮访兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮∶兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮济兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮�
	int m_bHaveSendCard; // 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮该兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮�

	int m_wTurnWiner; // 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗⑩偓拧脙鈥毭偮趁兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮幻兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮该兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓娄脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗偮冣�毭偮棵冣�毭偮�
	int m_bTurnCardCount; // 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮懊兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮疵兤捗⑩偓拧脙鈥毭偮�
	int m_bTurnCardData[] = new int[38]; // 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩�毬吢∶冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺�
	boolean m_bUserTrustee[] = new boolean[Constants.DDZ_PLAYER]; // 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓娄脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮�

	int m_bBackCard[] = new int[7]; // 脙茠脝鈥櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗⑩偓娄脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮久兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮γ兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮疵兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮好兤捗⑩偓拧脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮⒚兤捗偮冣�毭偮棵冣�毭偮�
	int m_bCardCount[] = new int[5]; // 脙茠脝鈥櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮犆兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮懊兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮疵兤捗⑩偓拧脙鈥毭偮�
	int m_bOutCardCount[] = new int[5]; // 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮∶兤捗⑩偓娄脙鈥毭偮�
	int m_bHandCardData[][] = new int[5][38]; // 脙茠脝鈥櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮┟兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮�
	int m_bMingPaiCardData[][] = new int[5][38]; // 脙茠脝鈥櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮┟兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮�
	int m_bGameStatus; // 脙茠脝鈥櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗⑩偓娄脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮久兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
	boolean m_bGameStarted;  // 脙茠脝鈥櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮Ｃ兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮∶兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
	int m_dwTimeStart; // 脙茠脝鈥櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮っ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬柯矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
	//脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮γ兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓娄脙鈥毭偮久兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮┟兤捗偮⒚兟⒚⑩�毬吢∶冣�毭偮兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗⑩偓拧脙鈥毭偮�
	boolean m_bTableStarted;
	int m_byRound;
	int m_byMaxRound;
	int m_goutui[] = new int[3];
	int m_doguser;
	int showdog;
	
	public String m_strParam;
	
	long m_dismissTimer;

	int m_byAgreeDismiss[] = new int[5];
	
	long m_LookOnUserID[] = new long[50]; // 脙茠脝鈥櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮疵兤捗⑩偓拧脙鈥毭偮�

	public int m_byZhuang;// 脙茠脝鈥櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮っ兤捗⑩偓拧脙鈥毭偮懊兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗⑩偓拧脙鈥毭偮趁兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮⒚兤捗⑩偓拧脙鈥毭偮犆兤捗嗏�櫭冣�毭偮γ兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮疵兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮姑兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮睹兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮济兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�

	public int m_vecWinScore[] = new int[5];
	public int m_vecLoseScore[] = new int[5];
	public int m_vecCardType[] = new int[5];
	public int m_vecRoundScore[] = new int[5];
	public int m_vecResultScore[] = new int[5];
	public int m_vecWinCnt[] = new int[5];
	public int m_yuPai[] = new int[5];
	public int m_lastOutCard[] = new int[2];//脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓娄脙鈥毭偮∶兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮好兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮⒚兤捗⑩偓拧脙鈥毭偮泵兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗⑩偓娄脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮⒚兤捗偮冣�毭偮棵冣�毭偮�
	public int m_bombCnt[] = new int [5];//脙茠脝鈥櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮济兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
	public int m_bombArray[] = new int [5];
	public int m_createTime = 0;
	public CMD_CURRENT_OutCard currentCard;
	

	int m_lGameTaxScore; // 脙茠脝鈥櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗⑩偓娄脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮久兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮幻兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮姑兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮好兤捗⑩偓拧脙鈥毭偮⒚兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗⑩偓拧脙鈥毭偮�
	int m_dwPlayerID[] = new int[Constants.MAX_CHAIR];  // 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓娄脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗偮冣�毭偮棵冣�毭偮� I D
	tagScoreInfo m_ScoreInfo[] = new tagScoreInfo[Constants.MAX_CHAIR];  // 脙茠脝鈥櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗⑩偓娄脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮久兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮幻兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮懊兤捗嗏�櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓娄脙鈥毭偮∶兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓娄脙鈥毭偮�
	{
		for (int i = 0; i < m_ScoreInfo.length; i++) {
			m_ScoreInfo[i] = new tagScoreInfo();
		}
	}
	PlayerBase mPlayers[] = new PlayerBase[Constants.DDZ_PLAYER];

	ServerUserItem m_pIUserItem[] = new ServerUserItem[Constants.DDZ_PLAYER]; // 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮⒚兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓拧脙鈥毭偮γ兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮该兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮好兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮好兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮姑兤捗⑩偓拧脙鈥毭偮�
	{
		for (int i = 0; i < m_pIUserItem.length; i++) {
			m_pIUserItem[i] = new ServerUserItem();
		}
	}
	int mSequentWinCount[] = new int[Constants.DDZ_PLAYER];

	DGTLogic_Server m_GameLogic = new DGTLogic_Server(); // 脙茠脝鈥櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗⑩偓娄脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮久兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠脗炉脙鈥毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮访兤捗⑩偓拧脙鈥毭偮�

	int m_lCellScore;
	int mLogicTime;
	int mCntRealUser;
	int mKXTime;
	int mActiveTime;
	int m_iDifen;

	DGTTableMgr m_objAppHandler;
	static int g_AndroidUIDIndex;

	void SetTableID(int lTableID) {
		mTableID = lTableID;
	}

	public void setAppHandler(DGTTableMgr handler) {
		m_objAppHandler = handler;
	}

	public DGTZTable() {
		mLogicTime = 0;
		m_objAppHandler = null;
		mTableID = 0;
		m_bRemove = false;

		Init();
	}

	void setBase(int lCellScore) {
		mKXTime = 0;
		m_lCellScore = lCellScore;
	}

	int getBase() {
		return m_lCellScore;
	}
	
	public boolean m_bRemove = false;
	
	public void DelayRemove() {
		m_bRemove = true;
	}
	public void ResetKillFlag() {
		m_bRemove = false;
	}

	public boolean ShouldBeRemoved() {
		return m_bRemove;
	}

	public void OnUserStandUp(int _Uid,boolean leaveroom) {
		if (_Uid == 0) {
			return;
		}

		int wChairID = FindSeat(_Uid);
		
		if(m_bTableStarted == false && wChairID != 0 && leaveroom == true){
			SUBCMD_S_StandUp cmd = new SUBCMD_S_StandUp();
			cmd.m_lUid = _Uid;
			cmd.m_wUserChairID = wChairID;
			cmd.m_dwTableID = m_dwTableID;
			SendData(Constants.INVALID_CHAIR, cmd.getJsonData());
		}
		if (m_bTableStarted == false && leaveroom == true) {
			if (wChairID > 0 && wChairID < 5) {
				m_pIUserItem[wChairID].Init();
				QpGameMgr.getInstance().OnRemoveUserRoom(_Uid);
			} else {
			}
		} else {
			if (wChairID < 5) {
				m_pIUserItem[wChairID].cbOnline = Constants.US_OFFLINE;
			}
		}
	}

	boolean hasUser(int uid) {
		for (int i = 0; i < Constants.DDZ_PLAYER; i++) {
			if (m_pIUserItem[i] != null && m_pIUserItem[i].getUid() != 0 ) {// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
				tagUserData pUserData = m_pIUserItem[i].GetUserData();
				if (pUserData.dwUserID == uid) {
					return true;
				}
			}
		}
		return false;
	}

	boolean isEmpty() {
		for (int i = 0; i < Constants.DDZ_PLAYER; i++) {
			if (m_pIUserItem[i] != null && m_pIUserItem[i].getUid() != 0) {// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
				return false;
			}
		}
		return true;
	}

	void Init() {
		m_bGameStatus = Constants.GS_WK_FREE;
		m_createTime = (int) (System.currentTimeMillis() / 1000);
		// 脙茠脝鈥櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗⑩偓娄脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮久兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮┟兤捗偮⒚兟⒚⑩�毬吢∶冣�毭偮兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗⑩偓拧脙鈥毭偮�
		m_goutui[0] = -1;
		m_goutui[1] = -1;
		m_goutui[2] = -1;
		XiScore[0] = 0;
		XiScore[2] = 0;
		XiScore[1] = 0;
		XiScore[3] = 0;
		XiScore[4] = 0;
		BombMoney[0] = 0;
		BombMoney[1] = 0;
		BombMoney[2] = 0;
		BombMoney[3] = 0;
		BombMoney[4] = 0;
		banktime[0] = 0;
		banktime[1] = 0;
		banktime[2] = 0;
		banktime[3] = 0;
		banktime[4] = 0;
		nongmin[0] = 0;
		nongmin[1] = 0;
		nongmin[2] = 0;
		nongmin[3] = 0;
		nongmin[4] = 0;
		goutuitime[0] = 0;
		goutuitime[1] = 0;
		goutuitime[2] = 0;
		goutuitime[3] = 0;
		goutuitime[4] = 0;
		m_vecInputWenZi="";	
		firstround = 0;
		jiaogoutui=0;
		OneVsFour=false;
		chongkaiju = false;
		peopleking = false;
		isjiaogoutui =0;
		MingPaiTimes = 1;
		m_doguser = -1;
		showdog = 0;
		m_wBombTime = 1;
		m_bLandScore = 0;
		m_wFirstUser = 0;
		m_bMingCard = 0;
		m_bHaveSendCard = 0;
		m_bCurrentState = 0;
		m_wOutBombCount = 0;
		m_wFirstUser = Constants.INVALID_CHAIR;
		m_wBankerUser = Constants.INVALID_CHAIR;
		m_wCurrentUser = Constants.INVALID_CHAIR;
		Constants.memset(m_bScoreTimes, 0, Constants.sizeof(m_bScoreTimes));
		Constants.memset(m_bCallScoreTimes, 0, Constants.sizeof(m_bCallScoreTimes));
		Constants.memset(m_bCallScoreTag, 0, Constants.sizeof(m_bCallScoreTag));
		Constants.memset(m_bCallBanker, 0, Constants.sizeof(m_bCallBanker));
		Constants.memset(m_bScoreInfo, 0, Constants.sizeof(m_bScoreInfo));
		Constants.memset(isMingPai, 0, Constants.sizeof(isMingPai));
		Constants.memset(SelectMingPai, 0, Constants.sizeof(SelectMingPai));


		// 脙茠脝鈥櫭冣�毭偮γ兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮┟兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠脗垄脙垄芒鈧∶偮冣�姑呪�溍兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮访兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮∶兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮济兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮�
		m_bTurnCardCount = 0;
		m_wTurnWiner = Constants.INVALID_CHAIR;
		Constants.memset(m_bTurnCardData, 0, Constants.sizeof(m_bTurnCardData));
		Constants.memset(m_bUserTrustee, 0);

		// 脙茠脝鈥櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮犆兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮访兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮∶兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮济兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮�
		Constants.memset(m_bBackCard, 0, Constants.sizeof(m_bBackCard));
		Constants.memset(m_bCardCount, 0, Constants.sizeof(m_bCardCount));
		Constants.memset(m_bOutCardCount, 0, Constants.sizeof(m_bOutCardCount));
		Constants.memset(m_bHandCardData, 0);
		Constants.memset(m_bMingPaiCardData, 0);

		// memset(m_pIUserItem,0,sizeof(m_pIUserItem));

		for (int i = 0; i < Constants.DDZ_PLAYER; i++) {
			//m_pIUserItem[i] = new ServerUserItem();
			mPlayers[i] = null;
			mSequentWinCount[i] = 0;
		}

		m_bGameStatus = Constants.GS_WK_FREE; // 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮趁兤捗⑩偓拧脙鈥毭偮懊兤捗嗏�櫭冣�毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮┟兤捗⑩偓拧脙鈥毭偮Ｃ兤捗⑩偓娄脙鈥毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		m_bGameStarted = false;
		m_dwTimeStart = 0;

		m_lCellScore = 0;

		mKXTime = 0;
		mCntRealUser = 1;
		
		m_dismissTimer = 0;
		m_byAgreeDismiss[0] = 0;
		m_byAgreeDismiss[1] = 0;
		m_byAgreeDismiss[2] = 0;
		Constants.memset(m_LookOnUserID, 0, Constants.sizeof(m_LookOnUserID)); //
		m_byRound = 0;
		m_byMaxRound = 0;
		m_byZhuang = 0;
		for (int i = 0; i <5; i++) {
			m_vecWinScore[i] = 0;
			m_vecLoseScore[i] = 0;
			m_vecResultScore[i] = 0;
			m_bombArray[i] = 0;
			m_bombCnt[i] = 0;

		}
		
		currentCard = new CMD_CURRENT_OutCard();
	
	}

	void UnInit() {
		for (int i = 0; i < Constants.DDZ_PLAYER; ++i) {
			if (mPlayers[i] != null) {
				// delete mPlayers[i];
			}
			mPlayers[i] = null;
			if (m_pIUserItem[i] != null) {
				m_pIUserItem[i].Init();;
			}
		}
	}

	public boolean SendGameMessage(int wSubCmdID, Object pData, int wDataSize, int wChairID, String data) {
		MSG_FOR_TABLE subcmd = new MSG_FOR_TABLE();
		subcmd.wSubCmd = wSubCmdID;
		subcmd.wChairID = wChairID;
		subcmd.strData = data;
		subcmd.byData = pData;
		String sData = subcmd.getJsonData();
		for (int i = 0; i < Constants.DDZ_PLAYER; ++i) {
			if (mPlayers[i] != null && mPlayers[i].GetChairID() == wChairID) {
				ServerUserItem pUserItem = GetServerUserItem(wChairID);
				if (pUserItem != null && pUserItem.IsAndroidUser()) {
					SendPacket(subcmd, 0);
				} else {
					mPlayers[i].SendPacket(Constants.PktID_DDZ_TableDataResult, subcmd, 0, sData);
				}
			}
		}
		return true;
	}


	boolean SendPacket(Object pMsg, int wSize) {
		OnRecv(pMsg, wSize);
		return true;
	}

	boolean ProcessRecvdPacket(int dwMaxPacketSize) {
		return true;
	}

	boolean OnRecv(Object pMsg, int wSize) {
		MSG_FOR_TABLE pTableCmd = (MSG_FOR_TABLE) pMsg;
		OnGameMessage(pTableCmd.wSubCmd, pTableCmd.byData, 0, GetServerUserItem(pTableCmd.wChairID));
		return true;
	}
	
	void tableinit(){
		m_goutui[0] = -1;
		m_goutui[1] = -1;
		m_goutui[2] = -1;
		XiScore[0] = 0;
		XiScore[2] = 0;
		XiScore[1] = 0;
		XiScore[3] = 0;
		XiScore[4] = 0;
		BombMoney[0] = 0;
		BombMoney[1] = 0;
		BombMoney[2] = 0;
		BombMoney[3] = 0;
		BombMoney[4] = 0;
		firstround = 0;
		jiaogoutui=0;
		OneVsFour = false;
		peopleking = false;
		isjiaogoutui =0;
		MingPaiTimes = 1;
		m_doguser = -1;
		showdog = 0;
		m_wBombTime = 1;
		Constants.memset(isMingPai, 0, Constants.sizeof(isMingPai));
		Constants.memset(SelectMingPai, 0, Constants.sizeof(SelectMingPai));
	}

	boolean OnRecv(int uid, String[] vecArg) {

		for (int i = 0; i < Constants.DDZ_PLAYER; i++) {
			ServerUserItem pIUserItem = GetServerUserItem(i);

			if (pIUserItem != null && pIUserItem.GetUserID() == uid) {
				MSG_FOR_TABLE pTableCmd = new MSG_FOR_TABLE();
				pTableCmd.wSubCmd = Constants.atoi(vecArg[1]);
				pTableCmd.wChairID = i;
				String data = vecArg.length >= 4 ? vecArg[3] : "";
				pTableCmd.strData = data;
				String[] vecArg1 = pTableCmd.strData.split("\\.");
				OnGameMessage(pTableCmd.wSubCmd, vecArg1, GetServerUserItem(pTableCmd.wChairID));
			}
		}

		return true;
	}

	void Update(int frameTime) {
		m_DealTime = (int) (System.currentTimeMillis() / 1000);
		mLogicTime += frameTime;
		for (int i = 0; i < Constants.DDZ_PLAYER; ++i) {
			if (mPlayers[i] != null && m_pIUserItem[i] != null) {
				mPlayers[i].Update(frameTime);
			}
		}
		ProcessRecvdPacket(4096);
		mKXTime += frameTime;
	}
	boolean HasBomb(){
		
		
		
		return true;
	}


	boolean OnEventGameStart(boolean liuju) {

        tableinit();
		// printf("---------------------------- Round %d
		// ----------------------------\n", _game_round_count );
		// 脙茠脝鈥櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮懊兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		SetGameStatus(Constants.GS_WK_PLAYING);

		// 脙茠脝鈥櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮犆兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮┟兤捗偮⒚兟⒚⑩�毬吢∶冣�毭偮兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗⑩偓拧脙鈥毭偮�
		int cbSendGoodCard = Constants.rand() % Constants.GOOD_CARD_PERCENT;
		int cbAndroidUserCount = 0;
		int wAndroidUser[] = new int[Constants.DDZ_PLAYER];

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脗垄脙垄芒鈧∶偮冣�γ偮久兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓娄脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮懊兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮∶兤捗⑩偓娄脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		for (int wChairID = 0; wChairID < Constants.DDZ_PLAYER; ++wChairID) {
			ServerUserItem pServerUserItem = GetServerUserItem(wChairID);
			if (pServerUserItem != null && pServerUserItem.IsAndroidUser()) {
				wAndroidUser[cbAndroidUserCount] = wChairID;
				++cbAndroidUserCount;
			}
		}
		for (int wChairID = 0; wChairID < Constants.DDZ_PLAYER; ++wChairID) {
			ServerUserItem pServerUserItem = GetServerUserItem(wChairID);
			if (pServerUserItem != null) {
				tagUserData pUserData = pServerUserItem.GetUserData();
				pUserData.lScore -= m_lCellScore;
				SendUserScore(pServerUserItem);
			}
		}
	
		// 脙茠脝鈥櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮Ｃ兤捗嗏�櫭冣�毭偮兤捗⑩偓娄脙垄芒鈥毬呪�溍兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮疵兤捗⑩偓拧脙鈥毭偮∶兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮�
		int bRandCard[] = new int[162];
		m_GameLogic.RandCardList(bRandCard, Constants.sizeof(bRandCard));
		//bRandCard = m_GameLogic.m_cbCardData.clone();
		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬柯矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬柯矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮燼
		for (int i = 0; i < Constants.DDZ_PLAYER; i++) {
			m_bCardCount[i] = 31;
			Constants.CopyMemory(m_bHandCardData[i], bRandCard, i * m_bCardCount[i], m_bCardCount[i]);
			for(int j = 0;j<31;j++){
				if(m_bHandCardData[i][j]==40){	
					System.out.println("gamestart/num"+i+"has red8");
					for(int k = 0; k<3;k++){
						if(m_goutui[k]==-1){
							m_goutui[k]=i;
							break;
						}
					}					
				}
			}
		}
//		int  testpai[] = {1, 78,78, 78,79, 79, 79, 17, 17, 17, 33, 33,33,49, 			
//						  1, 49, 49, 23,23, 22, 18, 18, 18, 19, 19, 19, 22,22,23,
//						  1,18,0,0,0,0,0,0,0};
//		int  testpai1[] = {1, 78,78, 78,79, 79, 79, 17, 17, 17, 33, 33,33,49, 			
//				  1, 49, 49, 23,23, 22, 18, 18, 18, 19, 19, 19, 22,22,23,
//				  1,18,0,0,0,0,0,0,0};
//		
//		
//		m_bHandCardData[0]=testpai;
//		m_bHandCardData[1]=testpai1;

		
		Constants.CopyMemory(m_bBackCard, bRandCard, 155, Constants.sizeof(m_bBackCard));
		m_GameLogic.SortCardList(m_bBackCard, 7, Constants.ST_ORDER);

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬柯矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮棵兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠脝鈥櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮好兤捗偮⒚兟⒚⑩�毬吢∶冣�毭偮兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗⑩偓拧脙鈥毭偮⒚兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮懊兤捗⑩偓娄脙鈥毭偮�
		m_wFirstUser = 0;// rand()%DDZ_PLAYER;
		m_wCurrentUser = m_wFirstUser;
		m_bMingCard = m_bHandCardData[m_wCurrentUser][(Constants.rand() % 31)];

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮γ兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮⒚兤捗⑩偓拧脙鈥毭偮っ兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		CMD_S_SendAllCard SendAllCard = new CMD_S_SendAllCard();
		SendAllCard.wCurrentUser = m_wCurrentUser;

		// 脙茠脝鈥櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮┟兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮�
		// Constants.CopyMemory(SendAllCard.bCardData, m_bHandCardData,
		// Constants.sizeof(m_bHandCardData));
		SendAllCard.bCardData = m_bHandCardData.clone();
		SendAllCard.chongkaiju = chongkaiju?1:0;
		// 脙茠脝鈥櫭冣�毭偮γ兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮疵兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮好兤捗⑩偓拧脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮�
		Constants.CopyMemory(SendAllCard.bBackCardData, m_bBackCard, 7);

		String sData = SendAllCard.getJsonData();
		SendTableData(Constants.INVALID_CHAIR, Constants.SUB_S_SEND_CARD, SendAllCard, 0, sData);
		
			
		
		if (m_byRound == 0) {
			m_byRound = 1;
		}
		OnRoundInfoChange();
		
		SUBCMD_S_round cmd = new SUBCMD_S_round();
		cmd.round = m_byRound;
		SendData(Constants.INVALID_CHAIR, cmd.getJsonData());

		// 脙茠脝鈥櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮�
		for (int i = 0; i < Constants.DDZ_PLAYER; i++) {
			m_GameLogic.SortCardList(m_bHandCardData[i], m_bCardCount[i], Constants.ST_ORDER);
		}
		
		
		// 脙茠脝鈥櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮懊兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮┟兤捗偮⒚兟⒚⑩�毬吢∶冣�毭偮兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗⑩偓拧脙鈥毭偮�
		if (m_wBankerUser == Constants.INVALID_CHAIR){
//			for(int user =0;user <5;user++){
//				for(int i=0; i<16; i++){
//					int value = m_bHandCardData[user][i];
//					if(value == 0x33){
//						m_wBankerUser = user;
//						break;
//					}
//				}
//			}
			//脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬柯矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮棵兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠脝鈥櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮好兤捗偮⒚兟⒚⑩�毬吢∶冣�毭偮兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮⒚兤捗偮冣�毭偮棵冣�毭偮�
			int []numbers = {0,1,2,3,4};
	        Random random = new Random();
	        int index = random.nextInt(numbers.length);	 
	        int dog = random.nextInt(3);
	        m_wBankerUser = index;
	       // m_wBankerUser = 0;
	        for(int i=0;i<7;i++){
	        	if(m_bBackCard[i]==40){
	        		System.out.println("bankuser backcard has red8");
					for(int k = 0; k<3;k++){
						if(m_goutui[k]==-1){
							m_goutui[k]=m_wBankerUser;
							break;
						}
					}
	        	}
	        }

	        if(m_doguser==-1){
	        	
	        	m_doguser = m_goutui[dog];
	        	System.out.println("gamestart/doguser"+m_doguser+"bankuser"+m_wBankerUser);
	        }
	        
		}
		
		

		// 脙茠脝鈥櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮懊兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		SetGameStatus(Constants.GS_WK_PLAYING);

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮γ兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮懊兤捗⑩偓拧脙鈥毭偮趁兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬柯矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		m_bCardCount[m_wBankerUser] = 38;
		Constants.CopyMemory(m_bHandCardData[m_wBankerUser],31, m_bBackCard, Constants.sizeof(m_bBackCard));
		m_GameLogic.SortCardList(m_bHandCardData[m_wBankerUser], m_bCardCount[m_wBankerUser], Constants.ST_ORDER);
		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮访兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮∶兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮济兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮�
		m_bTurnCardCount = 0;
		m_wTurnWiner = m_wBankerUser;
		m_wCurrentUser = m_wBankerUser;

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮γ兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		CMD_S_GameStart GameStart = new CMD_S_GameStart();
		GameStart.wLandUser = m_wBankerUser;
		GameStart.bLandScore = m_bLandScore;
		GameStart.wCurrentUser = m_wCurrentUser;
		GameStart.chongkaiju = chongkaiju?1:0;
		//娴嬭瘯鍙嫍鑵�
		//m_doguser=m_wBankerUser;
		if(m_doguser==m_wBankerUser){
			isjiaogoutui = 1;
			GameStart.bGouTui = 0;
		}else{
			GameStart.bGouTui = 40;
		}
		
		GameStart.doguser = m_doguser;
		Constants.CopyMemory(GameStart.bBackCard, m_bBackCard, Constants.sizeof(m_bBackCard));

		String startData = GameStart.getJsonData();
		SendTableData(Constants.INVALID_CHAIR, Constants.SUB_S_GAME_START, GameStart, 0, startData);
		for(int i = 0;i<5;i++){			
			if(i==m_wBankerUser){
				System.out.print("gamestart/usercard"+i+"/");
				Constants.CopyMemory(m_bMingPaiCardData[i], m_bHandCardData[i], 38);
				for(int j = 0;j<38;j++){
					System.out.print(m_bHandCardData[i][j]+",");
				}
				System.out.println();
			}else{
				System.out.print("gamestart/usercard"+i+"/");
				Constants.CopyMemory(m_bMingPaiCardData[i], m_bHandCardData[i], 31);
				for(int j = 0;j<31;j++){
					System.out.print(m_bHandCardData[i][j]+",");
				}
				System.out.println();
			}
		}
		
		chongkaiju = false;
		return true;
	}
	
	static int log_counter = 0;

	boolean OnEventGameEnd(int wChairID, ServerUserItem pIServerUserItem, int cbReason) {
		
		
		
		
		SetGameStatus(Constants.GS_WK_FREE);
		if(cbReason!=999){
			for(int i = 0;i<5;i++){
				if(i==m_wBankerUser){
					banktime[i]++;
				}else if(i==m_doguser){
					goutuitime[i]++;
				}else{
					nongmin[i]++;
				}
			}
			m_byRound = m_byRound + 1;
			OnRoundInfoChange();
			XiQian();
		}
		
		
		
		
		
		
		if(cbReason==999){
			chongkaiju = true;
			return OnEventGameStart(true);
			
		}
		if(cbReason == Constants.GER_NORMAL){
			CMD_S_GameEnd GameEnd = new CMD_S_GameEnd();

			int bCardPos = 0;
			for (int i = 0; i < Constants.DDZ_PLAYER; i++) {
				GameEnd.bCardCount[i] = m_bCardCount[i];
				Constants.CopyMemory(GameEnd.bCardData,bCardPos, m_bHandCardData[i], m_bCardCount[i]);
				bCardPos += m_bCardCount[i];
			}
			m_wBombTime = Constants.__min(m_wBombTime, 1600);

			for (int i = 0; i < Constants.DDZ_PLAYER; i++) {
				m_bScoreTimes[i] = Constants.__max(m_bScoreTimes[i], 1);
			}

			int lScore = 0;
			int winSeat = 0;
			for(int i = 0; i < Constants.DDZ_PLAYER; i++){
				if(m_bCardCount[i] == 0){
					winSeat = i;
					m_vecWinCnt[winSeat]++;
				}
			}
			if((m_wBankerUser == winSeat)||winSeat==m_doguser){
			for (int i = 0; i < Constants.DDZ_PLAYER; i++) {
				lScore = 1;				
				if((i == m_wBankerUser) || (i == m_doguser)){
					
						
						if(m_wBankerUser!=m_doguser){
							lScore=lScore*3*MingPaiTimes*m_score+XiScore[i];												
						}else{
							lScore=lScore*8*MingPaiTimes*m_score+XiScore[i];								
						}
																															
				}else{
					lScore=-(lScore*2)*MingPaiTimes*m_score+XiScore[i];					
				}
				
				GameEnd.lGameScore[i] = lScore;
				m_vecResultScore[i] += lScore;
				
			}}else{
				for (int i = 0; i < Constants.DDZ_PLAYER; i++) {
					lScore = 1;				
					if((i == m_wBankerUser)||(i==m_doguser)){
						if(m_wBankerUser!=m_doguser){
							lScore=-lScore*3*MingPaiTimes*m_score+XiScore[i];												
						}else{
							lScore=-lScore*8*MingPaiTimes*m_score+XiScore[i];								
						}					
					}else{
						lScore=lScore*2*MingPaiTimes*m_score+XiScore[i];					
					}
					
					GameEnd.lGameScore[i] = lScore;
					m_vecResultScore[i] += lScore;
					
				}
				
			}
			JSONObject root = new JSONObject();
			String UIDList = "";
			String NameList = "";

			for(int i = 0; i < m_pIUserItem.length;i ++){
				if(m_pIUserItem.length - 1 != i){
					NameList += m_pIUserItem[i].szNickName + ",";
					UIDList += m_pIUserItem[i].dwUserID + ",";
				}else{
					UIDList += m_pIUserItem[i].dwUserID;
					NameList += m_pIUserItem[i].szNickName;
				}
			}
			
			String strRoundScore = IJsonExport.sprintf_BYTE(GameEnd.lGameScore, 5);
			
			root.put("scoreList", strRoundScore);
			root.put("UIDList", UIDList);
			root.put("NameList", NameList);
			root.put("byRound", m_byRound-2);			
			Replay.AddReportData(root,GetType());
			
			
			System.out.println(GameEnd.lGameScore[m_wBankerUser]+GameEnd.lGameScore[m_doguser]);
			SUBCMD_S_JieSuan cmd = new SUBCMD_S_JieSuan();
			cmd.nUserScore = m_vecResultScore;
			SendData(Constants.INVALID_CHAIR, cmd.getJsonData());
			
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓娄脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮幻兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮懊兤捗嗏�櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓娄脙鈥毭偮∶兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓娄脙鈥毭偮矫兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓娄脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮裁兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩�毬吢∶冣�毭偮兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓娄脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬柯矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬柯矫兤捗嗏�櫭冣�毭偮兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠芒鈧∶冣�毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮Ｃ兤捗嗏�櫭冣�毭偮兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠芒鈧∶冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗嗏�櫭冣�毭偮兤捗⑩偓娄脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮�
			for (int i = 0; i < Constants.DDZ_PLAYER; i++) {
				if (m_pIUserItem[i] != null) {
					tagUserData pUserData = m_pIUserItem[i].GetUserData();
					GameEnd.dwUserID[i] = pUserData.dwUserID;
//					if(BombMoney[i]==1){
//						GameEnd.m_bombArray[i] = 0;
//					}else{
						GameEnd.m_bombArray[i] = XiScore[i];
				//	}
									
				}
			}
//			if(jiaogoutui<=0){
//				GameEnd.m_goutui = 40;
//			}else{
//				GameEnd.m_goutui = jiaogoutui;
//			}
			ServerUserItem pIUserItem = GetServerUserItem(m_doguser);
			ServerUserItem pIUserItem1 = GetServerUserItem(m_wBankerUser);
			GameEnd.m_goutui = pIUserItem.GetUserID();
			GameEnd.m_dizhu = pIUserItem1.GetUserID();
			GameEnd.jushuing = m_byRound;
			System.out.println("/gameend/doguser="+m_doguser+"dizhu="+m_wBankerUser);
			
			String sData = GameEnd.getJsonData();
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮γ兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓娄脙鈥毭偮犆兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
			SendTableData(Constants.INVALID_CHAIR, Constants.SUB_S_GAME_END, GameEnd, 0, sData);

			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮好兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮疵兤捗⑩偓拧脙鈥毭偮裁兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮⒚兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓拧脙鈥毭偮γ兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮该兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮�
			m_wFirstUser = wChairID;

			// 脙茠脝鈥櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮济兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗⑩偓拧脙鈥毭偮疵兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗⑩偓娄脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮久兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮�
			ConcludeGame();

		}
		
		if (m_byRound <= 1 && cbReason == Constants.GAME_END_DISMISS) {
			
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮γ兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓娄脙鈥毭偮犆兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
			CMD_S_GameEnd GameEnd = new CMD_S_GameEnd();
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓娄脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮幻兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮懊兤捗嗏�櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓娄脙鈥毭偮∶兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓娄脙鈥毭偮矫兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓娄脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮裁兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩�毬吢∶冣�毭偮兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓娄脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬柯矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬柯矫兤捗嗏�櫭冣�毭偮兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠芒鈧∶冣�毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮Ｃ兤捗嗏�櫭冣�毭偮兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠芒鈧∶冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗嗏�櫭冣�毭偮兤捗⑩偓娄脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮�
			for (int i = 0; i < Constants.DDZ_PLAYER; i++) {
				if (m_pIUserItem[i] != null) {
					tagUserData pUserData = m_pIUserItem[i].GetUserData();
					GameEnd.dwUserID[i] = pUserData.dwUserID;
			
				}
			}

			String sData = GameEnd.getJsonData();			
			SendTableData(Constants.INVALID_CHAIR, Constants.SUB_S_GAME_DISMISS, GameEnd, 0, sData);
			ConcludeGame();
			
			SUBCMD_S_DismissRoom cmd = new SUBCMD_S_DismissRoom();
			cmd.lUid = 0;
			cmd.cbResult = 0;
			cmd.m_wUserChairID = 0;
			cmd.m_dwTableID = m_dwTableID;

			SendData(Constants.INVALID_CHAIR, cmd.getJsonData());
			
	
			DelayRemove();
			
			QpGameMgr.getInstance().OnDismissRoom(this);
			
		}else if (m_byRound > m_byMaxRound || cbReason == Constants.GAME_END_DISMISS){
			
		
			int before_cost[] = new int[5];
			int after_cost[] = new int[5];

			int cost[] = new int[5];			
			for(int i=0;i<5;i++)
			{
				before_cost[i] = 0;
				cost[i] = 0;
				after_cost[i] = 0;
			}
			
			for (int i = 0; i <5; i++) 
			{				
				if(m_pIUserItem[i].dwUserID > 0)
				{
					SHMUser user = dthall.getInstance().getUserInfo(m_pIUserItem[i].dwUserID);
					if(user != null)
					{
						before_cost[i] = user.getGem(0);
					}
				}
			}			
			int minRound = 2;
			if(m_byMaxRound > 8)
			{
				minRound = 4;
			}			
			if (m_byRound > minRound) {

				if (m_payWay.equalsIgnoreCase("FZPAY")) {
					int cost_gem = 0;
					for (int i = 0; i <5; i++) {
						if (m_pIUserItem[i].dwUserID > 0) {
							cost_gem += (m_byCostGem/m_byMaxRound)*(m_byRound-1);
						}
					}					
					if (m_Creator > 0) {
						SHMUser user = dthall.getInstance().getUserInfo(m_Creator);
						if (user != null && cost_gem < 100) {
							user.getGem(0 - cost_gem);
						}
					} else {
						SHMUser user = dthall.getInstance().getUserInfo(m_pIUserItem[0].dwUserID);
						if (user != null && cost_gem < 100) {
							user.getGem(0 - cost_gem);
						}
						cost[0] = 0 - cost_gem;
					}
				}
				if (m_payWay.equalsIgnoreCase("AAPAY")) {
					for (int i = 0; i <5; i++) {
						if (m_pIUserItem[i].dwUserID > 0) {
							SHMUser user = dthall.getInstance().getUserInfo(m_pIUserItem[i].dwUserID);
							if (user != null && m_byCostGem < 20) {
								user.getGem(0 - (m_byCostGem/m_byMaxRound)*(m_byRound-1));
								cost[i] = 0 - (m_byCostGem/m_byMaxRound)*(m_byRound-1);
							}
						}
					}
				}
				if (m_payWay == "WINPAY") {
					int cost_gem = 0;
					int maxResultScore = 0;
					int winner = 0;
					int maxWinScore = 0;
					for (int k = 0; k <5; k++) {
						if(m_vecResultScore[k]  > 0)
						{
							maxWinScore += m_vecResultScore[k];
						}
					}
					for (int k = 0; k <5; k++) {
						if (m_vecResultScore[k] > maxResultScore) {
							winner = k;
							maxResultScore = m_vecResultScore[k];
						}
						if (m_pIUserItem[k].dwUserID > 0) {
							cost_gem += m_byCostGem;
						}
					}
					if(cost_gem > 0)
					{
						for (int k = 0; k <5; k++) {
							if (m_vecResultScore[k] > 0) {
								int lFangZhu = m_pIUserItem[k].dwUserID;
								if (lFangZhu > 0) {
									SHMUser user = dthall.getInstance().getUserInfo(lFangZhu);
									int temp_cost = m_vecResultScore[k] * cost_gem / maxWinScore;
									if(temp_cost <= 1)	temp_cost = 1;
									user.getGem(0 - temp_cost);	
									cost[k] = 0-temp_cost;
								}
							}
						}	
					}			
				}
				if (m_payWay == "BIGWINPAY") {
					int cost_gem = 0;
					int maxResultScore = 0;
					int winner = 0;
					for (int k = 0; k <5; k++) {
						if (m_vecResultScore[k] > maxResultScore) {
							winner = k;
							maxResultScore = m_vecResultScore[k];
						}
						if (m_pIUserItem[k].dwUserID > 0) {
							cost_gem += m_byCostGem;
						}
					}
					if (winner <5) {
						int lFangZhu = m_pIUserItem[winner].dwUserID;
						if (lFangZhu > 0) {
							SHMUser user = dthall.getInstance().getUserInfo(lFangZhu);
							if (user != null && m_byCostGem < 50) {
								user.getGem(0 - cost_gem);
								cost[winner] = 0-cost_gem;
							}
						}
					}
				}

				if(m_payWay == "CLUBPAY"){
					int cost_gem = 0;
					for (int i = 0; i <5; i++) {
						if (m_pIUserItem[i].dwUserID > 0) {
							cost_gem += (m_byCostGem/m_byMaxRound)*(m_byRound-1);
						}
					}
					DbInfoMgr.getInstance().costClubOwnerGem(this.m_clubOwnerId,cost_gem);	
				}
				for (int i = 0; i <5; i++) 
				{				
					if(m_pIUserItem[i].dwUserID > 0)
					{
						SHMUser user = dthall.getInstance().getUserInfo(m_pIUserItem[i].dwUserID);
						if(user != null)
						{
							after_cost[i] = user.getGem(0);
						}
					}
				}					
			}
			SUBCMD_S_REPORT cmd = new SUBCMD_S_REPORT();
			cmd.cbReason = cbReason;
			cmd.whoDismiss = 0;

			for (int k = 0; k <5; k++) {
				cmd.vecWinScore[k] = m_vecWinScore[k];
				cmd.vecLoseScore[k] = m_vecLoseScore[k];
				cmd.vecResultScore[k] = m_vecResultScore[k];
				cmd.vecWinCnt[k] = m_vecWinCnt[k];
				cmd.m_bombArray[k] = XiScore[k];
				cmd.banktime[k] = banktime[k];
				cmd.nongmin[k] = nongmin[k];
				cmd.goutuitime[k] = goutuitime[k];
			}

			SendData(Constants.INVALID_CHAIR, cmd.getJsonData());

			log_counter++;
			log_counter = log_counter % 100;
			Long t = System.currentTimeMillis() / 1000;
			Long battle_id = (t % 1000000) * 100 + log_counter;

			SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
			String created = df.format(new Date());
			{

				JSONObject root = new JSONObject();

				root.put("command", "save_battle_log");
				root.put("battle_id", battle_id);

				root.put("room_type", GetType());
				root.put("hallwfdesc", m_strParam);

				root.put("room_id", m_dwTableID);
				root.put("creator", GetCreator());
				
				root.put("jushu", m_byMaxRound);
				root.put("limitscore", 0);
				
				if (m_payWay == "WINPAY") {
					root.put("payway", 1);	
				}else if (m_payWay == "BIGWINPAY") {
					root.put("payway", 2);
				}else{
					root.put("payway", 0);
				}
				root.put("created", created);
				root.put("uid0", (int) m_pIUserItem[0].dwUserID);
				root.put("nickname0", m_pIUserItem[0].szNickName);
				root.put("score0", m_vecResultScore[0]);
				root.put("cost0", cost[0]);
				root.put("WinCnt0", m_vecWinCnt[0]);
				root.put("BomdCnt0", m_bombCnt[0]);				
				root.put("uid1", (int) m_pIUserItem[1].dwUserID);
				root.put("nickname1", m_pIUserItem[1].szNickName);
				root.put("score1", m_vecResultScore[1]);
				root.put("cost1", cost[1]);
				root.put("WinCnt1", m_vecWinCnt[1]);
				root.put("BomdCnt1", m_bombCnt[1]);				
				root.put("uid2", (int) m_pIUserItem[2].dwUserID);
				root.put("nickname2", m_pIUserItem[2].szNickName);
				root.put("score2", m_vecResultScore[2]);
				root.put("cost2", cost[2]);
				root.put("WinCnt2", m_vecWinCnt[2]);
				root.put("BomdCnt2", m_bombCnt[2]);	
				root.put("uid3", (int) m_pIUserItem[3].dwUserID);
				root.put("nickname3", m_pIUserItem[3].szNickName);
				root.put("score3", m_vecResultScore[3]);
				root.put("cost3", cost[3]);
				root.put("WinCnt3", m_vecWinCnt[3]);
				root.put("BomdCnt3", m_bombCnt[3]);		
				root.put("uid4", (int) m_pIUserItem[4].dwUserID);
				root.put("nickname4", m_pIUserItem[4].szNickName);
				root.put("score4", m_vecResultScore[4]);
				root.put("cost4", cost[4]);
				root.put("WinCnt4", m_vecWinCnt[4]);
				root.put("BomdCnt4", m_bombCnt[4]);	
		

				
				root.put("headurl0", dthall.getInstance().Handle_OnGetUserAvatar(m_pIUserItem[0].dwUserID));
				root.put("headurl1", dthall.getInstance().Handle_OnGetUserAvatar(m_pIUserItem[1].dwUserID));
				root.put("headurl2", dthall.getInstance().Handle_OnGetUserAvatar(m_pIUserItem[2].dwUserID));
				root.put("headurl3", dthall.getInstance().Handle_OnGetUserAvatar(m_pIUserItem[3].dwUserID));
				root.put("headurl4", dthall.getInstance().Handle_OnGetUserAvatar(m_pIUserItem[4].dwUserID));
				
				GameDB.getInstance().push_task(null, root);
				if(m_clubId != 0){
					//club
					root.put("clubid", m_clubId);
					root.put("wfdesc", m_wanFaStr);
					if(m_payWay == "CLUBPAY"){
						root.put("payway", 10);
					}
					ClubRedis.getInstance().addClubBattleLog(m_clubId,root.toString());
				}
				try
				{
					for(int i =0;i<5;i++)
					{
						if(m_pIUserItem[i].dwUserID > 0 && cost[i] != 0)
						{
							JSONObject root_cost = new JSONObject();
							root_cost.put("command", "save_charge_log");
							root_cost.put("created", created);
							root_cost.put("uid", (int) m_pIUserItem[i].dwUserID);
							root_cost.put("before_cost", (int) before_cost[i]);
							root_cost.put("after_cost", (int) after_cost[i]);
							root_cost.put("cost", (int) cost[i]);
							root_cost.put("reason", "逮狗腿" + m_pIUserItem[0].dwUserID + "逮狗腿 " + m_byMaxRound + "" + m_payWay );
							root_cost.put("room_id", m_dwTableID);
							
							GameDB.getInstance().push_task(null, root_cost);
						}
					}	
				}catch(Exception e)
				{
					e.printStackTrace();
				}
			}

			m_bTableStarted = false;
			for (int i = 0; i <5; i++) {// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮⒚兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧γ冣�毭偮该兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
				m_vecResultScore[i] = 0;
			}

			DelayRemove();
			ConcludeGame();
			
			QpGameMgr.getInstance().OnDismissRoom(this);
			
			
			
		}



		return false;
	}

	boolean OnGameMessage(int wSubCmdID, String[] vecArg, ServerUserItem pIServerUserItem) {
		mKXTime = 0;
		switch (wSubCmdID) {
		case Constants.SUB_C_USER_READY:// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬柯矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮好兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		{
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			if (pIServerUserItem != null && !pIServerUserItem.IsAndroidUser()) {
				setBase(Constants.atoi(vecArg[0]));
				tagUserData pUserData = pIServerUserItem.GetUserData();
				for (int i = 0; i < Constants.DDZ_PLAYER; i++) {
					if (m_pIUserItem[i] != null && m_pIUserItem[i].GetUserData() != null) {
						m_pIUserItem[i].GetUserData().cbUserStatus = Constants.US_READY;
					}
				}
				TryStartGame();
				return true;
			}
		}
		case Constants.SUB_C_LAND_SCORE: // 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		{

			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮ッ兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			tagUserData pUserData = pIServerUserItem.GetUserData();
			if (pUserData.cbUserStatus != Constants.US_PLAY)
				return true;

			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮ッ兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			// ASSERT(m_wCurrentUser == pUserData.wChairID);
			if (m_wCurrentUser != pUserData.wChairID)
				return false;

			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠脗垄脙垄芒鈧∶偮冣�毭偮姑兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮济兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			CMD_C_LandScore pLandScore = new CMD_C_LandScore();
			// pUserData.wChairID
			if (vecArg.length > 0) {
				pLandScore.bLandScore = Constants.atoi(vecArg[0]);
			} else {
				pLandScore.bLandScore = 0;
			}

			return OnUserLandScore(pUserData.wChairID, pLandScore.bLandScore);
		}
		case Constants.SUB_C_OUT_CART: 
		{
		
			CMD_C_OutCard pOutCard = new CMD_C_OutCard();

			pOutCard.bCardCount = Constants.atoi(vecArg[0]);
			pOutCard.setCardData(vecArg[1]);
			pOutCard.isGouTui =  Constants.atoi(vecArg[2]);
			


			tagUserData pUserData = pIServerUserItem.GetUserData();
			System.out.println("chupai/"+pUserData.wChairID+"cardnum/shuliang"+pOutCard.bCardCount);
			if (pUserData.cbUserStatus != Constants.US_PLAY)
				return true;
			
			if(pOutCard.isGouTui==1){
				System.out.println("dachu goutui");
				showdog = 1;			
				CMD_S_PlayerGouTui playerGouTui = new CMD_S_PlayerGouTui();
				playerGouTui.chairID = pUserData.wChairID;
				playerGouTui.onevsfour =0;
				if(m_wanfa==7){
					if(OneVsFour){
						peopleking = true;
					}
				}
				
				String sData = playerGouTui.getJsonData();
				SendTableData(Constants.INVALID_CHAIR, Constants.SUB_S_PLAYERGOUTUI, playerGouTui, 0, sData);
			}

			return OnUserOutCard(pUserData.wChairID, pOutCard.bCardData, pOutCard.bCardCount);
		}
		case Constants.SUB_C_PASS_CARD: {

			tagUserData pUserData = pIServerUserItem.GetUserData();
			if (pUserData.cbUserStatus != Constants.US_PLAY)
				return true;


			return OnUserPassCard(pUserData.wChairID);
		}
		case Constants.SUB_C_TRUSTEE: 
		{
			// TODO
			CMD_C_UserTrustee pUserTrustee = new CMD_C_UserTrustee();

			pUserTrustee.wUserChairID = Constants.atoi(vecArg[0]);
			pUserTrustee.bTrustee = vecArg[1] == "true";
			m_bUserTrustee[pUserTrustee.wUserChairID] = pUserTrustee.bTrustee;
			String sData = pUserTrustee.getJsonData();
			SendTableData(Constants.INVALID_CHAIR, Constants.SUB_C_TRUSTEE, pUserTrustee, 0, sData);

			return true;
		}
		}

		return true;
	}

	boolean OnGameMessage(int wSubCmdID, Object pDataBuffer, int wDataSize, ServerUserItem pIServerUserItem) {
		// GAME_LOG( "<DDZTable>:\t %s\t\t chair:%d\n", GetMsgStr(wSubCmdID),
		// pIServerUserItem.GetUserData().wChairID );

		switch (wSubCmdID) {
		case Constants.SUB_C_USER_READY:// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬柯矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮好兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		{
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			if (pIServerUserItem != null && !pIServerUserItem.IsAndroidUser()) {
				tagUserData pUserData = pIServerUserItem.GetUserData();
				return OnUserReady(pUserData.wChairID);
			}
			return true;
		}
		case Constants.SUB_C_LAND_SCORE: // 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		{
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮ッ兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			// ASSERT(wDataSize == sizeof(CMD_C_LandScore));
			// if (wDataSize != sizeof(CMD_C_LandScore)) return false;

			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮ッ兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			tagUserData pUserData = pIServerUserItem.GetUserData();
			if (pUserData.cbUserStatus != Constants.US_PLAY)
				return true;

			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮ッ兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			// ASSERT(m_wCurrentUser == pUserData.wChairID);
			if (m_wCurrentUser != pUserData.wChairID)
				return false;

			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠脗垄脙垄芒鈧∶偮冣�毭偮姑兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮济兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			CMD_C_LandScore pLandScore = (CMD_C_LandScore) pDataBuffer;
			return OnUserLandScore(pUserData.wChairID, pLandScore.bLandScore);
		}
		case Constants.SUB_C_OUT_CART: // 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		{
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			//System.out.println("脙茠脝鈥櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮⒚兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧∶冣�毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮∶兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮懊兤捗⑩偓娄脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮睹兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗嗏�櫭冣�毭偮γ兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮�");
			CMD_C_OutCard pOutCard = (CMD_C_OutCard) pDataBuffer;
			// int wHeadSize = sizeof(CMD_C_OutCard) -
			// sizeof(pOutCard.bCardData);

			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮ッ兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			// ASSERT(wDataSize >= wHeadSize);
			// if (wDataSize < wHeadSize) return false;
			// ASSERT(wDataSize == (wHeadSize +
			// pOutCard.bCardCount*sizeof(pOutCard.bCardData[0])));
			// if (wDataSize != (wHeadSize +
			// pOutCard.bCardCount*sizeof(pOutCard.bCardData[0]))) return false;

			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮ッ兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			tagUserData pUserData = pIServerUserItem.GetUserData();
			if (pUserData.cbUserStatus != Constants.US_PLAY)
				return true;

			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠脗垄脙垄芒鈧∶偮冣�毭偮姑兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮济兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			if(pOutCard.isGouTui==1){
				System.out.println("-----脙茠脗搂脙鈥γ偮矫冣�毭偮┟兤捗偮ッ冣�毭偮冣�毭偮睹兤捗偮γ兟⒚⑩�毬偮懊兟⒚⑩�毬呪�溍兤捗偮ッ兟⒚⑩�毬偮∶冣�毭偮好兤捗偮っ冣�毭偮好兟⒚⑩�毬偮犆兤捗偮兟⒚⑩�毬偮姑兟⒚⑩�毬⑩偓锟矫兤捗偮兟⒚⑩�毬偮γ冣�毭偮棵兤捗偮兟⒚⑩�毬偮懊冣�γ⑩偓鈩�-----");
			}
			return OnUserOutCard(pUserData.wChairID, pOutCard.bCardData, pOutCard.bCardCount);
		}
		case Constants.SUB_C_PASS_CARD: {
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮ッ兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			tagUserData pUserData = pIServerUserItem.GetUserData();
			if (pUserData.cbUserStatus != Constants.US_PLAY)
				return true;

			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠脗垄脙垄芒鈧∶偮冣�毭偮姑兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮济兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			return OnUserPassCard(pUserData.wChairID);
		}
		case Constants.SUB_C_TRUSTEE: // 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮懊兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮姑兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧γ冣�毭偮该兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		{
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮ッ兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			// ASSERT(wDataSize == sizeof(CMD_C_UserTrustee));
			// if (wDataSize != sizeof(CMD_C_UserTrustee)) return false;

			CMD_C_UserTrustee pUserTrustee = (CMD_C_UserTrustee) pDataBuffer;

			m_bUserTrustee[pUserTrustee.wUserChairID] = pUserTrustee.bTrustee;

			String sData = pUserTrustee.getJsonData();
			SendTableData(Constants.INVALID_CHAIR, Constants.SUB_C_TRUSTEE, pDataBuffer, wDataSize, sData);

			return true;
		}
		}

		return true;
	}

	boolean OnUserReady(int wChairID) {
		ServerUserItem pIServerUserItem = GetServerUserItem(wChairID);
		if (pIServerUserItem == null) {
			return false;
		}

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		tagUserData pUserData = pIServerUserItem.GetUserData();
		boolean bLookonUser = (pUserData.cbUserStatus == Constants.US_LOOKON);

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗⑩偓拧脙鈥毭偮ッ兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		// ASSERT(bLookonUser == false);
		// ASSERT(m_pIUserItem[pUserData.wChairID] == pIServerUserItem);
		if (bLookonUser == true)
			return false;
		if (pUserData.cbUserStatus >= Constants.US_PLAY)
			return true;

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗⑩偓拧脙鈥毭偮Ｃ兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧∶冣�毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		pUserData.cbUserStatus = Constants.US_READY;

		SendUserStatus(pIServerUserItem);

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮趁兤捗⑩偓拧脙鈥毭偮懊兤捗嗏�櫭冣�毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		if (StartVerdict() == true) {
			TryStartGame();
			return true;
		}

		return true;
	}

	boolean OnUserLandScore(int wChairID, int bLandScore) {
		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮ッ兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		if (GetGameStatus() != Constants.GS_WK_SCORE)
			return true;
		if (wChairID != m_wCurrentUser)
			return false;

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮ッ兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧γ冣�毭偮该兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		if (((bLandScore > 3) && (bLandScore != 255)) || (bLandScore <= m_bLandScore)){
			//return false;
		}else{
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗⑩偓拧脙鈥毭偮Ｃ兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧∶冣�毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			if (bLandScore != 255) {
				m_bLandScore = bLandScore;
				m_wBankerUser = m_wCurrentUser;
			}
		}
		m_bScoreInfo[wChairID] = bLandScore;

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮趁兤捗⑩偓拧脙鈥毭偮懊兤捗嗏�櫭冣�毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		if ((m_bLandScore == 3) || (m_wFirstUser == (wChairID + 1) % Constants.DDZ_PLAYER)) {
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮久兤捗嗏�櫭冣�毭偮γ兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			if (m_bLandScore == 0) {
				int cbSendGoodCard = Constants.rand() % Constants.GOOD_CARD_PERCENT;
				int cbAndroidUserCount = 0;
				int wAndroidUser[] = new int[Constants.DDZ_PLAYER];

				// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗⑩偓拧脙鈥毭偮Ｃ兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧∶冣�毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
				Constants.ZeroMemory(m_bScoreInfo);

				// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮Ｃ兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬柯矫兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
				for (int wChairID1 = 0; wChairID1 < Constants.DDZ_PLAYER; ++wChairID1) {
					ServerUserItem pServerUserItem = GetServerUserItem(wChairID1);
					if (pServerUserItem.IsAndroidUser()) {
						wAndroidUser[cbAndroidUserCount] = (wChairID1);
						++cbAndroidUserCount;
					}
				}

				int wHaveGoodCardAndroidUser = Constants.INVALID_CHAIR;
				if (cbAndroidUserCount > 0)
					wHaveGoodCardAndroidUser = wAndroidUser[Constants.rand() % cbAndroidUserCount];

				// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮懊兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧∶冣�毭偮得兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮懊兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
//				if (0 == cbSendGoodCard && wHaveGoodCardAndroidUser != Constants.INVALID_CHAIR) {
//					// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮Ｃ兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
//					int bRandCard[] = new int[54];
//					m_GameLogic.RandCardList(bRandCard, Constants.sizeof(bRandCard));
//
//					int cbGoodCard[] = new int[Constants.NORMAL_COUNT];
//					m_GameLogic.GetGoodCardData(cbGoodCard);
//
//					// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮趁兤捗⑩偓拧脙鈥毭偮懊兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮∶兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
//					m_GameLogic.RemoveGoodCardData(cbGoodCard, Constants.NORMAL_COUNT, bRandCard, Constants.FULL_COUNT);
//
//					// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧γ兟⒚⑩�毬呪�溍兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮Ｃ兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
//					Constants.CopyMemory(m_bHandCardData[wHaveGoodCardAndroidUser], cbGoodCard, Constants.NORMAL_COUNT);
//					m_bCardCount[wHaveGoodCardAndroidUser] = 17;
//					for (int i = 0, j = 0; i < Constants.DDZ_PLAYER; i++) {
//						if (i != wHaveGoodCardAndroidUser) {
//							m_bCardCount[i] = 17;
//							Constants.CopyMemory(m_bHandCardData[i], bRandCard[j * 17], 17);
//							++j;
//						}
//					}
//					Constants.CopyMemory(m_bBackCard, bRandCard[34], Constants.sizeof(m_bBackCard));
//					m_GameLogic.SortCardList(m_bBackCard, 3, Constants.ST_ORDER);
//				}else 
				{
					// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮Ｃ兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
					int bRandCard[] = new int[162];
					m_GameLogic.RandCardList(bRandCard, Constants.sizeof(bRandCard));

					// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧γ兟⒚⑩�毬呪�溍兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮Ｃ兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
					for (int i = 0; i < Constants.DDZ_PLAYER; i++) {
						m_bCardCount[i] = 31;
						Constants.CopyMemory(m_bHandCardData[i], bRandCard,i * m_bCardCount[i],m_bCardCount[i]);
						//CopyMemory(&m_bHandCardData[i], &bRandCard[i*m_bCardCount[i]], sizeof(BYTE)*m_bCardCount[i]);
					}
					Constants.CopyMemory(m_bBackCard, bRandCard,155, Constants.sizeof(m_bBackCard));
					m_GameLogic.SortCardList(m_bBackCard, 7, Constants.ST_ORDER);
				}

				// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
				m_wCurrentUser = Constants.rand() % Constants.DDZ_PLAYER;
				m_wFirstUser = m_wCurrentUser;

				// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮Ｃ兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
				CMD_S_SendAllCard SendAllCard = new CMD_S_SendAllCard();
				SendAllCard.wCurrentUser = m_wCurrentUser;

				// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮Ｃ兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
				SendAllCard.bCardData = m_bHandCardData.clone();
				// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮Ｃ兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
				Constants.CopyMemory(SendAllCard.bBackCardData, m_bBackCard, 7);
				for (int i = 0; i < Constants.DDZ_PLAYER; i++) {
					String sData = SendAllCard.getJsonData();
					SendTableData(i, Constants.SUB_S_SEND_CARD, SendAllCard, 0, sData);
				}
				
	
				// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮Ｃ兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
				for (int i = 0; i < Constants.DDZ_PLAYER; i++) {
					m_GameLogic.SortCardList(m_bHandCardData[i], m_bCardCount[i], Constants.ST_ORDER);
				}

				return true;
			}

			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗⑩偓拧脙鈥毭偮Ｃ兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧∶冣�毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			if (m_wBankerUser == Constants.INVALID_CHAIR)
				m_wBankerUser = m_wFirstUser;

			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
			SetGameStatus(Constants.GS_WK_PLAYING);

			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮懊兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧∶冣�毭偮得兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			m_bCardCount[m_wBankerUser] = 38;
			Constants.CopyMemory(m_bHandCardData[m_wBankerUser],31, m_bBackCard, Constants.sizeof(m_bBackCard));
			m_GameLogic.SortCardList(m_bHandCardData[m_wBankerUser], m_bCardCount[m_wBankerUser], Constants.ST_ORDER);

			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠脗垄脙垄芒鈧∶偮冣�毭偮姑兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮济兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮�
			m_bTurnCardCount = 0;
			m_wTurnWiner = m_wBankerUser;
			m_wCurrentUser = m_wBankerUser;

			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠脗垄脙垄芒鈧∶偮冣�毭偮姑兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮济兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮�
			CMD_S_GameStart GameStart = new CMD_S_GameStart();
			GameStart.wLandUser = m_wBankerUser;
			GameStart.bLandScore = m_bLandScore;
			GameStart.wCurrentUser = m_wCurrentUser;
			Constants.CopyMemory(GameStart.bBackCard, m_bBackCard, Constants.sizeof(m_bBackCard));

			String sData = GameStart.getJsonData();
		//	SendTableData(Constants.INVALID_CHAIR, Constants.SUB_S_GAME_START, GameStart, 0, sData);
			

			return true;
		}

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		m_wCurrentUser = (wChairID + 1) % Constants.DDZ_PLAYER;

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠脗垄脙垄芒鈧∶偮冣�毭偮姑兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮济兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮�
		CMD_S_LandScore LandScore = new CMD_S_LandScore();
		LandScore.wLandUser = wChairID;
		LandScore.bLandScore = bLandScore;
		LandScore.wCurrentUser = m_wCurrentUser;
		LandScore.bCurrentScore = m_bLandScore;

		String sData = LandScore.getJsonData();
		//SendTableData(Constants.INVALID_CHAIR, Constants.SUB_S_LAND_SCORE, LandScore, 0, sData);

		return true;
	}
	void SameColorBomb(int wChairID,int[] bCardData,int bCardCount){
	
		int fangkuai = 0;
		int hongtao =0;
		int meihua = 0;
		int heitao = 0;
		int wang = 0;
		for(int i =0;i<bCardCount;i++){
		switch(bCardData[i]/16){
		case 0:fangkuai++;break;
		case 1:meihua++;break;
		case 2:hongtao++;break;
		case 3: heitao++;break;
		case 4:wang++;break;
		}			
		}
		if(wang==3){
			System.out.println("tree wangzha");
			BombMoney[wChairID]+=m_score;
		}else if(wang==4){
			System.out.println("four wangzha");
			BombMoney[wChairID]+=2*m_score;			
		}else if(wang==5 ){
			System.out.println("five wangzha");
			BombMoney[wChairID]+=4*m_score;	
		}else if(wang==6){
			System.out.println("six wangzha");
			BombMoney[wChairID]+=6*m_score;	
		}
		
		if((fangkuai+hongtao==5)&&(meihua+heitao==5)){
			System.out.println("five same color");
			BombMoney[wChairID]+=2*m_score;

			
		}else if((fangkuai+hongtao==6)&&(meihua+heitao==6)){
			System.out.println("six same color");
			BombMoney[wChairID]+=4*m_score;
			
		}else if((fangkuai+hongtao==5)||(meihua+heitao==5)){
			System.out.println("five same color");
			BombMoney[wChairID]+=m_score;
			
			if((fangkuai+hongtao==6)||(meihua+heitao==6)){
				System.out.println("six same color");
				BombMoney[wChairID]+=2*m_score;
				
			}
			
		}else if((fangkuai+hongtao==6)||(meihua+heitao==6)){
			System.out.println("six same color");
			BombMoney[wChairID]+=2*m_score;
			
		}
		
		if(bCardCount==7){
			System.out.println("seven num zha");
			BombMoney[wChairID]+=m_score;
		}
		if(bCardCount==8){
			System.out.println("eight num zha");
			BombMoney[wChairID]+=2*m_score;
		}
		if(bCardCount==9){
			System.out.println("nine num zha");
			BombMoney[wChairID]+=3*m_score;
		}
		if(bCardCount==10){
			System.out.println("ten num zha");
			BombMoney[wChairID]+=4*m_score;
		}
		if(bCardCount==11){
			System.out.println("elevn num zha");
			BombMoney[wChairID]+=5*m_score;
		}
		if(bCardCount==12){
			System.out.println("twelve num zha");
			BombMoney[wChairID]+=6*m_score;
		}	
	}
	void XiQian(){
		for(int i = 0 ;i<5;i++){
			
				XiScore[i]+=BombMoney[i]*4;
				XiScore[(i+1)%5]-=BombMoney[i];
				XiScore[(i+2)%5]-=BombMoney[i];
				XiScore[(i+3)%5]-=BombMoney[i];
				XiScore[(i+4)%5]-=BombMoney[i];				
			
		}
	}

	boolean OnUserOutCard(int wChairID, int bCardData[], int bCardCount) {
		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮ッ兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		if (GetGameStatus() != Constants.GS_WK_PLAYING){
			System.out.println("onchupai/gamestatus,error");
			return true;
		}
			
		if (wChairID != m_wCurrentUser){
			System.out.println("onchupai/currentuser,error");
			return false;
		}
		
		//脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮趁兤捗⑩偓拧脙鈥毭偮懊兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮睹兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮趁兤捗⑩偓拧脙鈥毭偮懊兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮⒚兤捗⑩偓拧脙鈥毭偮犆兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮Ｃ兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		currentCard.bCardCount = bCardCount;
		currentCard.setCardData(bCardData,bCardCount);
		
		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮Ｃ兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		m_GameLogic.SortCardList(bCardData, bCardCount, Constants.ST_ORDER);

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		int bCardType = m_GameLogic.GetCardType(bCardData, bCardCount);
		
		if(bCardType == Constants.CT_BOMB_CARD){
			SameColorBomb(wChairID,bCardData,bCardCount);
			System.out.println(wChairID+"num user bombmoney"+BombMoney[wChairID]);
		}
		
		
		
		
		
		
		
		if (bCardType == Constants.CT_ERROR){
			System.out.println("onchupai/cardtype,error");
			return false;
		}
			

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧γ冣�毭偮该兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		if (m_bTurnCardCount == 0)
			m_bTurnCardCount = bCardCount;
		else if (m_GameLogic.CompareCard(m_bTurnCardData, bCardData, m_bTurnCardCount, bCardCount) == false){
			System.out.println("onchupai/comparecard,error");
			return false;
			
		}
			

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗嗏�櫭冣�毭偮兤捗⑩偓娄脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮Ｃ兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		if (m_GameLogic.RemoveCard(bCardData, bCardCount, m_bHandCardData[wChairID], m_bCardCount[wChairID]) == false)
		{
			System.out.println("onchupai/removecard,error");
			return false;
			
		}else{
			System.out.println(bCardCount);
			for (int i = 0; i < bCardCount; i++) {
				for (int j = 0; j < m_bMingPaiCardData[wChairID].length; j++) {
					if (bCardData[i] ==  m_bMingPaiCardData[wChairID][j]) {						
						m_bMingPaiCardData[wChairID][j] = 0;
						
						break;
					}
				}
			}
		}
	
		m_bCardCount[wChairID] -= bCardCount;

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮济兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩�毬吢∶冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮趁兤捗⑩偓拧脙鈥毭偮懊兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮睹兤捗偮冣�毭偮棵冣�毭偮�
		m_bTurnCardCount = bCardCount;
		m_bOutCardCount[wChairID]++;
		Constants.CopyMemory(m_bTurnCardData, bCardData);

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		if ((bCardType == Constants.CT_BOMB_CARD) || (bCardType == Constants.CT_MISSILE_CARD)){
			m_bombCnt[m_wCurrentUser]++;
			m_wBombTime *= 2;
			if(m_wCurrentUser == 0){
				m_bombArray[0] += 10;
				m_bombArray[1] -= 5;
				m_bombArray[2] -= 5;
			}
            if(m_wCurrentUser == 1){
            	m_bombArray[1] += 10;
				m_bombArray[0] -= 5;
				m_bombArray[2] -= 5;
			}
            if(m_wCurrentUser == 2){
            	m_bombArray[2] += 10;
				m_bombArray[1] -= 5;
				m_bombArray[0] -= 5;
			}
				
		
		}
			

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		m_wTurnWiner = wChairID;
		if (m_bCardCount[wChairID] != 0) {
			if (bCardType != Constants.CT_MISSILE_CARD)
				m_wCurrentUser = (m_wCurrentUser + 1) % Constants.DDZ_PLAYER;
		} else
			m_wCurrentUser = Constants.INVALID_CHAIR;

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		CMD_S_OutCard OutCard = new CMD_S_OutCard();
		OutCard.bCardCount = bCardCount;
		OutCard.wOutCardUser = wChairID;
		OutCard.wCurrentUser = m_wCurrentUser;
		Constants.CopyMemory(OutCard.bCardData, m_bTurnCardData);
		Constants.CopyMemory(OutCard.bHandCardData, m_bMingPaiCardData[wChairID]);		
		OutCard.handcardcount = m_bMingPaiCardData[wChairID].length;
		OutCard.showdog = showdog;
		if(m_wCurrentUser==255){
			OutCard.isMingPai = 0;
		}else{
			OutCard.isMingPai = SelectMingPai[wChairID];
		}
		if(jiaogoutui>0){
			OutCard.bGouTuiCard = jiaogoutui;
		}else{
			OutCard.bGouTuiCard = 40;
		}
		

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�

		String sData = OutCard.getJsonData();
		
		SendTableData(Constants.INVALID_CHAIR, Constants.SUB_S_OUT_CARD, OutCard, 0, sData);

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧γ冣�毭偮该兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		if (bCardType == Constants.CT_MISSILE_CARD)
			m_bTurnCardCount = 0;

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		if (m_wCurrentUser == Constants.INVALID_CHAIR)
			OnEventGameEnd(wChairID, null, Constants.GER_NORMAL);

		return true;
		
	}
	boolean OnUserPassCard(int wChairID) {
		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮ッ兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		if (GetGameStatus() != Constants.GS_WK_PLAYING){
			System.out.println("onpasscard/gamestatus,error");
			return true;
			
		}
			
			
		if ((wChairID != m_wCurrentUser) || (m_bTurnCardCount == 0)){
			System.out.println("onpasscard/currentuser,error|isnewturn");
			return false;
			
		}
			

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗⑩偓拧脙鈥毭偮Ｃ兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧∶冣�毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		m_wCurrentUser = (m_wCurrentUser + 1) % Constants.DDZ_PLAYER;
		if (m_wCurrentUser == m_wTurnWiner){
			m_bTurnCardCount = 0;
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮Ｃ兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			m_GameLogic.SortCardList(currentCard.bCardData, currentCard.bCardCount, Constants.ST_ORDER);

			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			int bCardType = m_GameLogic.GetCardType(currentCard.bCardData, currentCard.bCardCount);
			System.out.println("currentuser's cardtyep"+bCardType);
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
//			if ((bCardType == Constants.CT_BOMB_CARD) || (bCardType == Constants.CT_MISSILE_CARD)){
//				if(m_wCurrentUser == 0){
//					m_bombArray[0] += 10;
//					m_bombArray[1] -= 5;
//					m_bombArray[2] -= 5;
//				}
//                if(m_wCurrentUser == 1){
//                	m_bombArray[1] += 10;
//					m_bombArray[0] -= 5;
//					m_bombArray[2] -= 5;
//				}
//                if(m_wCurrentUser == 2){
//                	m_bombArray[2] += 10;
//					m_bombArray[1] -= 5;
//					m_bombArray[0] -= 5;
//				}
//					
//			}
		}
			

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		CMD_S_PassCard PassCard = new CMD_S_PassCard();
		PassCard.wPassUser = wChairID;
		PassCard.wCurrentUser = m_wCurrentUser;
		PassCard.bNewTurn = (m_bTurnCardCount == 0) ? 1 : 0;
		PassCard.first = 1;
		PassCard.changpaiuser = -1;
		if(PassCard.bNewTurn==1){
			peopleking = false;
		}
		String sData = PassCard.getJsonData();
		SendTableData(Constants.INVALID_CHAIR, Constants.SUB_S_PASS_CARD, PassCard, 0, sData);

		return true;
	}

	boolean IsGameStarted() {
		return m_bGameStarted;
	}

	// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
	boolean IsTableLocked() {
		return (StringUtils.isNotEmpty(m_szPassword));
	}

	String m_szPassword;

	// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
	boolean SendTableStatus() {
		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮ッ兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧γ冣�毭偮该兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�

		CMD_GR_TableStatus TableStatus = new CMD_GR_TableStatus();
		TableStatus.wTableID = mTableID;
		TableStatus.bPlayStatus = IsGameStarted() ? 1 : 0;

		String sData = TableStatus.getJsonData();
		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		SendTableData(Constants.INVALID_CHAIR, Constants.SUB_GR_TABLE_STATUS, TableStatus, 0, sData);

		return true;
	}

	

	// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
	boolean SendUserScore(ServerUserItem pServerUserItem) {
		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮ッ兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧γ冣�毭偮该兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		// ASSERT(pServerUserItem != null);
		// ASSERT(pServerUserItem.IsActive() == true);
		if (pServerUserItem.IsActive() == false)
			return false;

		tagUserData pUserData = pServerUserItem.GetUserData();

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		CMD_GR_UserScore UserScore = new CMD_GR_UserScore();
		UserScore.dwUserID = pUserData.dwUserID;
		UserScore.lScore = pUserData.lScore + pUserData.lStorageScore; // 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		UserScore.lGameGold = pUserData.lGameGold; // 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠脗垄脙垄芒鈧∶偮冣�毭偮姑兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮久兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧γ冣�毭偮该兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�//
		UserScore.lStorageGold = pUserData.lStorageGold; // 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮っ兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓娄脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓拧脙鈥毭偮┟兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮姑兤捗⑩偓拧脙鈥毭偮�
		UserScore.lWinCount = pUserData.lWinCount; // 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗⑩偓拧脙鈥毭偮趁兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮幻兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		UserScore.lLostCount = pUserData.lLostCount; // 脙茠脝鈥櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮睹兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		UserScore.lDrawCount = pUserData.lDrawCount; // 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮ッ兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮久兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		UserScore.lFleeCount = pUserData.lFleeCount; // 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮┟兤捗⑩偓拧脙鈥毭偮Ｃ兤捗⑩偓娄脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮疵兤捗⑩偓拧脙鈥毭偮�
		UserScore.lExperience = pUserData.lExperience; // 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		String sData = UserScore.getJsonData();
		SendTableData(Constants.INVALID_CHAIR, Constants.SUB_GR_USER_SCORE, UserScore, 0, sData);
		return true;
	}

	// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
	boolean SendUserStatus(ServerUserItem pServerUserItem) {
		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮ッ兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧γ冣�毭偮该兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		// ASSERT(pServerUserItem != null);
		// ASSERT(pServerUserItem.IsActive() == true);
		if (pServerUserItem.IsActive() == false)
			return false;

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		CMD_GR_UserStatus UserStatus = new CMD_GR_UserStatus();
		tagUserData pUserData = pServerUserItem.GetUserData();

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		UserStatus.dwUserID = pServerUserItem.dwUserID;
		UserStatus.wTableID = pUserData.wTableID;
		UserStatus.wChairID = pServerUserItem.wChairID;
		UserStatus.cbUserStatus = pServerUserItem.cbUserStatus;

		String sData = UserStatus.getJsonData();
		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		SendTableData(Constants.INVALID_CHAIR, Constants.SUB_GR_USER_STATUS, UserStatus, 0, sData);
		return true;
	}

	boolean WriteUserScore(int wChairID, int lScore, int lGameGold, int lRevenue, enScoreKind ScoreKind) {
		return WriteUserScore(wChairID, lScore, lGameGold, lRevenue, ScoreKind, -1);
	}

	boolean WriteUserScore(int wChairID, int lScore, int lGameGold, int lRevenue, enScoreKind ScoreKind,
			int lPlayTimeCount/* =-1 */) {
		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮ッ兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧γ冣�毭偮该兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		if (wChairID >= Constants.DDZ_PLAYER)
			return false;
		if (m_pIUserItem[wChairID] == null)
			return false;

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗⑩偓拧脙鈥毭偮Ｃ兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧∶冣�毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		m_ScoreInfo[wChairID].lScore = lScore;
		m_ScoreInfo[wChairID].lGameGold = lGameGold;
		m_ScoreInfo[wChairID].lRevenue = lRevenue;
		m_ScoreInfo[wChairID].ScoreKind = ScoreKind;

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧γ冣�毭偮该兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		WriteUserScore(m_pIUserItem[wChairID], lScore, lGameGold, lRevenue, ScoreKind);

		return true;
	}

	// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧γ冣�毭偮该兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
	boolean WriteUserScore(ServerUserItem pIServerUserItem, int lScore, int lGameGold, int lRevenue,
			enScoreKind ScoreKind) {
		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮ッ兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧γ冣�毭偮该兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		//// ASSERT(pIServerUserItem != null);
		if (pIServerUserItem == null)
			return false;

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		tagScoreInfo ScoreInfo = new tagScoreInfo();

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗⑩偓拧脙鈥毭偮Ｃ兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧∶冣�毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		ScoreInfo.lScore = lScore;
		ScoreInfo.lGameGold = lGameGold;
		ScoreInfo.lRevenue = lRevenue;
		ScoreInfo.ScoreKind = ScoreKind;

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮久兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩�毬吢∶冣�毭偮兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩�毬吢∶冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮疵兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		pIServerUserItem.WriteScore(ScoreInfo, (int) Constants.time(null) - m_dwTimeStart);

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠脗垄脙垄芒鈧∶偮冣�毭偮姑兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮济兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮�
		SendUserScore(pIServerUserItem);

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮っ兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓娄脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓拧脙鈥毭偮┟兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�

		return true;
	}

	boolean ConcludeGame() {
		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		m_bGameStarted = false;
		m_dwTimeStart = 0;
		m_bGameStatus = Constants.GS_WK_FREE;

		RepositTableFrameSink();

		for (int i = 0; i < Constants.DDZ_PLAYER; ++i) {
			if (m_pIUserItem[i] != null) {
				m_pIUserItem[i].SetUserStatus(Constants.US_SIT, GetTableID(), i);
				m_pIUserItem[i].cbUserStatus = Constants.US_NULL;
			}
			if (mPlayers[i] != null) {
				mPlayers[i].OnGameEnd();
			}
		}

		return true;
	}
	boolean StartGame(int _Uid){
		int wChairID = FindSeat(_Uid);		
		if (wChairID <5) {
			m_pIUserItem[wChairID].cbUserStatus = Constants.US_READY;
			SendUserStatus(m_pIUserItem[wChairID]);
		}
		TryStartGame();
		return false;
	}
	boolean TryStartGame(){
		int cntReady = 0;
		for (int i = 0; i < m_pIUserItem.length; i++) {
			ServerUserItem user = m_pIUserItem[i];
			if (user != null && ( user.cbUserStatus == Constants.US_READY || user.IsAndroidUser())) {
				cntReady++;
			}
		}
		if (cntReady ==5) {
			StartGame();
		}
		return false;
	}
	int AddRobot() {
		
		for (int i = 0; i < Constants.DDZ_PLAYER; ++i) {
			if (m_pIUserItem[i] == null ||  m_pIUserItem[i].getUid() == 0) {
				//m_pIUserItem[i] = new ServerUserItem();
				tagUserData pUserData = m_pIUserItem[i].GetUserData();
				AIPlayer user1 = new AIPlayer();
				mPlayers[i] = user1;
				m_pIUserItem[i].SetAndroidUser(true);

				pUserData.dwUserID = g_AndroidUIDIndex++;
				m_pIUserItem[i].setUid(pUserData.dwUserID);
				pUserData.lScore = 1000000000;
				pUserData.szName = Constants.getRandName(Constants.random(10000, 90000));
				if (Constants.random(0, 100) % 2 == 1) {
					// string random_name =
					// g_vecNames[dt::Math:getRandNrandomame(0,g_vecNames.size()-1)];
					// sprintf(pUserData.szName,random_name);
				}
				mPlayers[i].SetTable(this);
				mPlayers[i].SetChairID(i);
				m_pIUserItem[i].SetUserStatus(Constants.US_SIT, GetTableID(), i);

				return 1;
			}
		}
		
		return 0;
	}
	boolean StartGame() {
		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮ッ兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		if (m_bGameStarted == true)
			return false;
		m_bGameStarted = true;
		m_bTableStarted = true;
		m_dwTimeStart = (int) Constants.time(null);
		for(int i=0;i<5;i++){
			m_bombArray[i] = 0;
		}

		SHMUser user = null;
		for (int i = 0; i < Constants.DDZ_PLAYER; ++i) {
			
			if (m_pIUserItem[i] != null && mPlayers[i] != null) {
				if (!m_pIUserItem[i].IsAndroidUser()
						&& (user = getAppHandler().getUserInfo(m_pIUserItem[i].getUid())) != null) {
					user.getCoin(0 - Constants.abs((int) getBase()));
				}
				m_pIUserItem[i].SetUserStatus(Constants.US_PLAY, GetTableID(), i);
				mPlayers[i].OnGameBegin();
			}
		}
		return OnEventGameStart(false);
	}

	ServerUserItem GetServerUserItem(int wChairID) {
		if (wChairID >= Constants.DDZ_PLAYER) {
			return null;
		}
		// ASSERT(wChairID < DDZ_PLAYER);
		if (wChairID >= Constants.DDZ_PLAYER)
			return null;
		return m_pIUserItem[wChairID];
	}

	boolean SendTableData(int wChairID, int wSubCmdID, Object pData, int wDataSize, String data) {
		// 脙茠脝鈥櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮济兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮懊兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		if (wChairID == Constants.INVALID_CHAIR) {
			for (int i = 0; i < Constants.DDZ_PLAYER; i++) {
				if (mPlayers[i] != null) {
					mPlayers[i].SendGameMessage(wSubCmdID, pData, wDataSize, data);
				}
			}

			return true;
		}

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓娄脙垄芒鈥毬呪�溍兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮疵兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		if (wChairID < Constants.DDZ_PLAYER) {
			if (mPlayers[wChairID] != null) {
				mPlayers[wChairID].SendGameMessage(wSubCmdID, pData, wDataSize, data);
			}
			return true;
		}

		return false;
	}

	int GetGameStatus() {
		return m_bGameStatus;
	}

	void SetGameStatus(int cbGameStatus) {		
		m_bGameStatus = cbGameStatus;
	}

	int m_cbGameStatus;
	public int m_Creator;
	public String m_payWay;
	public int m_byCostGem;
	public int m_dwTableID;
	public int m_score;
	public int m_wanfa;

	boolean SendTableInfo(int wChairID) {
		CMD_GR_TableInfo TableInfo = new CMD_GR_TableInfo();
		TableInfo.wTableID = GetTableID();

		for (int i = 0; i < Constants.DDZ_PLAYER; i++) {
			ServerUserItem pIUserItem = GetServerUserItem(i);

			if (pIUserItem != null) {
				tagUserData pUserData = pIUserItem.GetUserData();
				// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
				TableInfo.UserData[i] = pUserData; // 脙茠脝鈥櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮睹兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			}
		}
		TableInfo.bStatus = GetGameStatus();

		String sData = TableInfo.getJsonData();
		SendTableData(Constants.INVALID_CHAIR, Constants.SUB_GR_TABLE_INFO, TableInfo, 0, sData);
		return false;
	}

	void RepositTableFrameSink() {
		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠脗垄脙垄芒鈧∶偮冣�毭偮姑兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮久兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		BombMoney[0] = 0;
		BombMoney[1] = 0;
		BombMoney[2] = 0;
		BombMoney[3] = 0;
		BombMoney[4] = 0;
		XiScore[0] = 0;
		XiScore[1] = 0;
		XiScore[2] = 0;
		XiScore[3] = 0;
		XiScore[4] = 0;
		
		m_wBombTime = 1;
		m_bLandScore = 0;
		m_bMingCard = 0;
		m_bHaveSendCard = 0;
		m_bCurrentState = 0;
		m_wOutBombCount = 0;
		m_wBankerUser = Constants.INVALID_CHAIR;
		m_wCurrentUser = Constants.INVALID_CHAIR;
		Constants.memset(m_bScoreTimes, 0);
		Constants.memset(m_bCallScoreTimes, 0);
		Constants.memset(m_bCallScoreTag, 0);
		Constants.memset(m_bCallBanker, 0);
		Constants.memset(m_bScoreInfo, 0);

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠脗垄脙垄芒鈧∶偮冣�毭偮姑兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮济兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮�
		m_bTurnCardCount = 0;
		m_wTurnWiner = Constants.INVALID_CHAIR;
		Constants.memset(m_bTurnCardData, 0);
		Constants.memset(m_bUserTrustee, false);

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮Ｃ兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗嗏�櫭冣�毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠脗垄脙垄芒鈧∶偮冣�毭偮姑兤捗嗏�櫭冣�毭偮っ兤捗⑩偓拧脙鈥毭偮济兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮�
		Constants.memset(m_bBackCard, 0);
		Constants.memset(m_bCardCount, 0);
		Constants.memset(m_bOutCardCount, 0);
		Constants.memset(m_bHandCardData, 0);

		m_bGameStarted = false;
	}

	boolean StartVerdict() {
		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		if (m_bGameStarted == true)
			return false;

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬柯矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮好兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		int wReadyUserCount = 0;
		tagUserData pUserData = null;
		for (int i = 0; i < Constants.DDZ_PLAYER; i++) {
			if (m_pIUserItem[i] != null && m_pIUserItem[i].getUid() != 0) {
				wReadyUserCount++;
				pUserData = m_pIUserItem[i].GetUserData();
				if (pUserData.cbUserStatus != Constants.US_READY)
					return false;
			}
		}

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		if (wReadyUserCount > 1L) {
			return (wReadyUserCount == Constants.DDZ_PLAYER);
		}

		return false;
	}

	boolean SendGameScene(int _Uid, int cbGameStatus) {
		
			SUBCMD_S_Table cmd = new SUBCMD_S_Table();
			cmd.vecInputWenZi = m_vecInputWenZi;
			cmd.m_dwTableID = m_dwTableID;// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮笽D
			cmd.m_bTableStarted = m_bTableStarted ? 1 : 0;// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮笽D
			cmd.m_bGameStarted = m_bGameStarted ? 1 : 0;// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬柯矫兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
			cmd.m_byRound = m_byRound;
			cmd.m_byMaxRound = m_byMaxRound;
			cmd.m_cntLookon = 1;// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
            cmd.m_payWay=m_payWay;
            cmd.m_score = m_score;
            cmd.m_wanfa = m_wanfa;
            cmd.onevsfour = OneVsFour?1:0;
			for (int i = 0; i <5; i++) {
				cmd.m_seatInfo[i].m_lUid = m_pIUserItem[i].dwUserID;// UID
				cmd.m_seatInfo[i].m_iSeatId = i;// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓娄脙垄芒鈥毬呪�溍兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮睹兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮〥
				cmd.m_seatInfo[i].m_iTotalCoin = m_pIUserItem[i].lUserScore;

				cmd.m_seatInfo[i].m_NickName = m_pIUserItem[i].szNickName;// NICKNAME
				
				cmd.m_seatInfo[i].m_iBetCoin = 0;//
				cmd.m_seatInfo[i].m_cbGender = m_pIUserItem[i].cbGender;
				cmd.m_seatInfo[i].m_iAvatar = m_pIUserItem[i].dwFaceID;//
				cmd.m_seatInfo[i].m_cbUserStatus = m_pIUserItem[i].cbUserStatus;// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮得兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
				cmd.m_seatInfo[i].m_iVipLevel = m_pIUserItem[i].cbVipLevel;// VIP
																			// LEVEL
				cmd.m_seatInfo[i].m_iTitle = 0;// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮好兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓娄脙鈥毭偮∶兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
				cmd.m_seatInfo[i].m_isLookon = 0;// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬柯矫兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧γ冣�毭偮该兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
				cmd.m_seatInfo[i].szIP = m_pIUserItem[i].szIP;
			}

			SendData(_Uid, cmd.getJsonData());
			for (int i = 0; i <5; i++) {
				if (m_pIUserItem[i].dwUserID > 0) {
					SendAvatar(m_pIUserItem[i].dwUserID);
				}
			}
		

		int wChiarID = FindSeat(_Uid);
		String temp = "";
		String msgBuf = "";
		switch (cbGameStatus) {
		case Constants.GS_WK_FREE: // 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		{
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			CMD_S_StatusFree StatusFree = new CMD_S_StatusFree();

			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗⑩偓拧脙鈥毭偮Ｃ兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧∶冣�毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			StatusFree.lBaseScore = m_lCellScore;
			StatusFree.tableStart = m_bTableStarted == true?1:0;
			StatusFree.bScoreTimes = m_vecResultScore;
			
			temp = String.format("\"cbGameStatus\":%d,\"lBaseScore\":%d,\"wChiarID\":%d,\"m_bTableStarted\":%d,\"bScoreTimes\":%s ", cbGameStatus, StatusFree.lBaseScore,wChiarID,StatusFree.tableStart,Constants.sprintf_Array(StatusFree.bScoreTimes, 5));
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮懊兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧∶冣�毭偮得兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓拧脙鈥毭偮裁兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			return SendTableData(wChiarID, Constants.SUB_S_GAME_SCENE, msgBuf, 0, temp);			
		}
		case Constants.GS_WK_SCORE: // 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		{
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			CMD_S_StatusScore StatusScore = new CMD_S_StatusScore();

			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗⑩偓拧脙鈥毭偮Ｃ兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧∶冣�毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			StatusScore.bLandScore = m_bLandScore;
			StatusScore.wCurrentUser = m_wCurrentUser;
			StatusScore.lBaseScore = m_lCellScore;
			StatusScore.bScoreInfo = m_bScoreInfo.clone();
			// CopyMemory(StatusScore.bCardData,m_bHandCardData[wChiarID],m_bCardCount[wChiarID]);
			StatusScore.bCardData = m_bHandCardData.clone();
			StatusScore.bUserTrustee = m_bUserTrustee.clone();

			String sData = StatusScore.getJsonData();
			temp = String.format("\"cbGameStatus\":%d ,%s", cbGameStatus, sData);
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮懊兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧∶冣�毭偮得兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗⑩偓拧脙鈥毭偮裁兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			return SendTableData(wChiarID, Constants.SUB_S_GAME_SCENE, msgBuf, 0, temp);
		}
		case Constants.GS_WK_PLAYING: // 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠脗垄脙垄芒鈧∶偮冣�毭偮姑兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓娄脙鈥毭偮久兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓鹿脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓拧脙鈥毭偮得兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		{
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			CMD_S_StatusPlay StatusPlay = new CMD_S_StatusPlay();

			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗⑩偓拧脙鈥毭偮Ｃ兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧∶冣�毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			StatusPlay.wBombTime = m_wBombTime;
			StatusPlay.wLandUser = m_wBankerUser;
			StatusPlay.wCurrentUser = m_wCurrentUser;
			StatusPlay.wLastOutUser = m_wTurnWiner;
			StatusPlay.bLandScore = m_bLandScore;
			StatusPlay.bTurnCardCount = m_bTurnCardCount;
			StatusPlay.lBaseScore = m_lCellScore;
			StatusPlay.bScoreTimes = m_vecResultScore;
			if(jiaogoutui>0){
				StatusPlay.wGouTui = jiaogoutui;
			}else{
				StatusPlay.wGouTui = 40;
			}
			StatusPlay.isjiaogoutui = isjiaogoutui;
			if(firstround<5){
				StatusPlay.ismingpai=1;
			}else{
				StatusPlay.ismingpai = 0;
			}
			
			StatusPlay.selectmingpai = SelectMingPai;
			
			StatusPlay.wdoguser = m_doguser;
			StatusPlay.showdog = showdog;
			Constants.CopyMemory(StatusPlay.bBackCard, m_bBackCard);
			Constants.CopyMemory(StatusPlay.bCardCount, m_bCardCount);
			Constants.CopyMemory(StatusPlay.bTurnCardData, m_bTurnCardData);
			//CopyMemory(StatusPlay.bCardData,m_bHandCardData[wChiarID],m_bCardCount[wChiarID]);
			StatusPlay.bCardData = m_bMingPaiCardData.clone();
			StatusPlay.cbCardData = m_bHandCardData.clone();
			Constants.CopyMemory(StatusPlay.bUserTrustee, m_bUserTrustee);
			String sData = StatusPlay.getJsonData();
			temp = String.format("\"cbGameStatus\":%d ,%s", cbGameStatus, sData);			
			return SendTableData(wChiarID, Constants.SUB_S_GAME_SCENE, msgBuf, 0, temp);
		}
		}

		return false;
		
		
		
	}
	

	boolean send(int lUid, int wMsgType, MSG_PACKET pMsg, int wSize) {
		MSG_FOR_TABLE pTable = (MSG_FOR_TABLE) pMsg;
		pMsg.SetMsgType(wMsgType);
		// getAppHandler().send(lUid, pMsg, wSize);
		onSend(lUid, pTable.getJsonData());
		return true;
	}

	boolean onSend(int lUid, String data) {
		((DGTTableMgr) getAppHandler()).onSend(lUid, data);
		return true;
	}

	private DGTTableMgr getAppHandler() {
		return m_objAppHandler;
	}

	@Override
	public int GetID() {
		return mTableID;
	}

	@Override
	public String GetType() {
		return "DGT";
	}

	@Override
	public int GetCreator() {
		return m_Creator;
	}

	@Override
	public void OnClientClose(int lUid) {
		OnUserStandUp(lUid,false);
	}


	public int CanSit(int _Uid) {
		SHMUser user = dthall.getInstance().getUserInfo(_Uid);
		if (user != null) {
			int check = m_byCostGem;
			if (user.getGem(0) < check) {
					if(m_payWay != "FZPAY"){
						return 11;
			    }
			}
		}
		if (m_Creator == _Uid) {
			return 14;
		}
		for (int i = 0; i <5; i++) {
			if (m_pIUserItem[i].dwUserID == _Uid) {
				return i;
			}
		}
		for (int i = 0; i <5; i++) {
			if (m_pIUserItem[i].dwUserID == 0) {
				return i;
			}
		}
		
		return 12;
	}

	@Override
	public int FindSeat(int _Uid) {
		for (int bySeatID = 0; bySeatID <5; bySeatID++) {
			if (m_pIUserItem[bySeatID].dwUserID == _Uid) {
				return bySeatID;
			}
		}
		return Constants.INVALID_CHAIR;
	}

	@Override
	public void OnUserSit(int _Uid) {
		
		SHMUser user = dthall.getInstance().getUserInfo(_Uid);
		
		//脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓娄脙垄芒鈥毬呪�溍兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮疵兤捗⑩偓娄脙鈥毭偮该兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮趁兤捗⑩偓拧脙鈥毭偮懊兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮该兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮该兤捗⑩偓娄脙鈥毭偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮好兤捗⑩偓拧脙鈥毭偮懊兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮っ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮姑兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�  mPlayers脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮好兤捗⑩偓拧脙鈥毭偮γ兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮济兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮∶兤捗⑩偓拧脙鈥毭偮犆兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮犆兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		onLogin(_Uid);
		OnUserSit(user);
		
		
		int bySeatID = FindSeat(_Uid);
		if (bySeatID <5) {
			m_pIUserItem[bySeatID].cbOnline = Constants.US_NULL;
			
		}			
	
		
		if (user != null) {
			for (int i = 0; i <5; i++) {
				if (m_pIUserItem[i].dwUserID == _Uid) {
					m_pIUserItem[i].dwUserID = _Uid;
					m_pIUserItem[i].wChairID = i;
					m_pIUserItem[i].dwFaceID = 0;
					m_pIUserItem[i].cbGender = user.getSex();
					m_pIUserItem[i].szNickName = user.getNickName(null);
					m_pIUserItem[i].szIP = user.getIP(null);
					
					SUBCMD_S_Sit cmd = new SUBCMD_S_Sit();
					cmd.m_lUid = _Uid;
					cmd.m_wUserChairID = m_pIUserItem[i].wChairID;
					cmd.m_dwTableID = m_dwTableID;
					cmd.m_lUserScore = m_vecResultScore[i];
					cmd.m_cbGender = m_pIUserItem[i].cbGender;
					cmd.m_iAvatar = m_pIUserItem[i].dwFaceID;
					cmd.szNickName = user.getNickName(null);
					cmd.szIP = user.getIP(null);

					SendData(Constants.INVALID_CHAIR, cmd.getJsonData());

					SendGameScene(_Uid, m_bGameStatus);
					SendAvatar(m_pIUserItem[i].dwUserID);

					return;
				}
			}
			for (int i = 0; i <5; i++) {
				if (m_pIUserItem[i].dwUserID == 0) {
					m_pIUserItem[i].dwUserID = _Uid;
					m_pIUserItem[i].lUserScore = 0;
					m_pIUserItem[i].wChairID = i;
					m_pIUserItem[i].dwFaceID = 0;
					m_pIUserItem[i].cbGender = user.getSex();
					//System.out.println("Ã§Å½Â©Ã¥Â®Â¶Ã¥ï¿½ï¿½Ã¤Â¸â€¹Ã¨Â®Â¾Ã§Â½Â®Ã§Å½Â©Ã¥Â®Â¶Ã¥Â§â€œÃ¥ï¿½ï¿½"+user.getNickName(null));
					m_pIUserItem[i].szNickName = user.getNickName(null);				
					m_pIUserItem[i].szIP = user.getIP(null);

					SUBCMD_S_Sit cmd = new SUBCMD_S_Sit();
					cmd.m_lUid = _Uid;
					cmd.m_wUserChairID = m_pIUserItem[i].wChairID;
					cmd.m_dwTableID = m_dwTableID;
					cmd.m_lUserScore = m_pIUserItem[i].lUserScore;
					cmd.m_cbGender = m_pIUserItem[i].cbGender;
					cmd.m_iAvatar = m_pIUserItem[i].dwFaceID;
					cmd.szNickName = user.getNickName(null);
					cmd.szIP = user.getIP(null);

					SendData(Constants.INVALID_CHAIR, cmd.getJsonData());

					SendGameScene(_Uid, m_bGameStatus);
					return ;

				}
			}
		}
		

		return;
		
		
	}
	void OnUserSit(SHMUser user){
		if (user == null || user.getUid() == 0) {
			System.out.println("脙搂脜陆脗漏脙楼脗庐脗露脙楼茂驴陆茂驴陆脙陇脗赂芒鈧姑兟γ⑩偓鈥澝偮睹兟偮济呪�櫭兟⑩偓锟矫偮兟γ嬧�犆偮访兟っ偮该柯矫兟ッ偮嬇撁兟ッ呪�溍偮�");
			return;
		}

		int wChairID = Constants.INVALID_CHAIR;
		
		if (wChairID == Constants.INVALID_CHAIR) {
			for (int i = 0; i < Constants.DDZ_PLAYER; i++) {
				if (m_pIUserItem[i] != null && m_pIUserItem[i].getUid() == user.getUid()) {
					wChairID = i;
					System.out.println("脙搂脜陆脗漏脙楼脗庐脗露脙楼茂驴陆茂驴陆脙陇脗赂芒鈧姑兟γ⑩偓鈥澝偮睹兟偮济呪�櫭兟⑩偓锟矫偮兟γ嬧�犆偮穟id脙楼茂驴陆芒鈧�溍兟ッ嬧�犆偮�");
					break;
				}
			}
		}
		if (wChairID == Constants.INVALID_CHAIR) {
			for (int i = 0; i < Constants.DDZ_PLAYER; i++) {
				if (m_pIUserItem[i] == null || m_pIUserItem[i].getUid() == 0) {
					wChairID = i;
				
					break;
				}
			}
		}

		if (wChairID != Constants.INVALID_CHAIR) {
		
			//脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮睹兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩�毬吢久冣�毭偮⒚兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗⑩偓拧脙鈥毭偮っ兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			tagUserData pUserData = m_pIUserItem[wChairID].GetUserData();
			pUserData.dwUserID = user.getUid();
			pUserData.lScore = user.getCoin(0);
			pUserData.dwFaceID = user.getAvatar();
			pUserData.cbGender = user.getSex();
			pUserData.cbMemberOrder = user.getVip();
			pUserData.szName = user.getNickName(null);
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗⑩偓娄脙鈥毭偮久兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗⑩偓拧脙鈥毭偮∶兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮疵兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
			UserPlayer player = new UserPlayer();
			player.setUid(user.getUid());
			player.setAppHandler(getAppHandler());
			mPlayers[wChairID] = player;
			mPlayers[wChairID].SetTable(this);
			mPlayers[wChairID].SetChairID(wChairID);
			
			//脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓娄脙垄芒鈥毬呪�溍兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮睹兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮γ兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮疵兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬柯矫兤捗⑩偓鹿脙垄芒鈥毬偮犆兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
			CMD_S_UserEnterTable UserEnterTable = new CMD_S_UserEnterTable();

			UserEnterTable.dwUserID = user.getUid();
			UserEnterTable.wCharID = wChairID;
			UserEnterTable.lBaseScore = m_lCellScore;
			UserEnterTable.szName = user.getNickName(null);
			String sData = UserEnterTable.getJsonData();
			SendTableData(Constants.INVALID_CHAIR, Constants.SUB_GR_USER_ENTER_TABLE, UserEnterTable, 0, sData);
		}
	}
	//脙茠脝鈥櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮睹兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
	void SendAvatar(int _Uid) {
		int wChairID = FindSeat(_Uid);
		if (wChairID == Constants.INVALID_CHAIR) {
			return;
		}

		String iter = dthall.getInstance().Handle_OnGetUserAvatar(_Uid);

		SUBCMD_S_Avatar cmd = new SUBCMD_S_Avatar();
		cmd.m_lUid = _Uid;
		if (iter != null) {
			cmd.szAvatarURL = iter;
		} else {
			cmd.szAvatarURL = "http://hfmj.qilehuyu.cn/hefei-80.png";
		}

		SendData(Constants.INVALID_CHAIR, cmd.getJsonData());

	}
	
	// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		void Handle_onBiaoQing(int _Uid, String vecArg[]) {
			int wChairID = FindSeat(_Uid);
			if (wChairID == Constants.INVALID_CHAIR) {
				// printf("Handle_onBiaoQing Error _Uid(%d)(%d)\n", _Uid, wChairID);
				return;
			}
			if (vecArg.length < 2)
				return;
			int index = Constants.atoi(vecArg[1]);

			SUBCMD_S_BiaoQing cmd = new SUBCMD_S_BiaoQing();
			cmd.m_lUid = _Uid;
			cmd.m_wUserChairID = wChairID;
			cmd.m_iBiaoQingIndex = index;

			SendData(Constants.INVALID_CHAIR, cmd.getJsonData());
		}
		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		void Handle_onYuYin(int _Uid, String vecArg[]) {
			int wChairID = FindSeat(_Uid);
			if (wChairID == Constants.INVALID_CHAIR) {
				// printf("Handle_onBiaoQing Error _Uid(%d)(%d)\n", _Uid, wChairID);
				return;
			}
			if (vecArg.length < 2)
				return;
			int index = Constants.atoi(vecArg[1]);

			SUBCMD_S_YuYin cmd = new SUBCMD_S_YuYin();
			cmd.m_lUid = _Uid;
			cmd.m_wUserChairID = wChairID;
			cmd.m_iYuYinIndex = index;

			SendData(Constants.INVALID_CHAIR, cmd.getJsonData());
		}

		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		void Handle_onChat(int _Uid, String vecArg[]) {
			int wChairID = FindSeat(_Uid);
			if (wChairID == Constants.INVALID_CHAIR) {
				// printf("Handle_onBiaoQing Error _Uid(%d)(%d)\n", _Uid, wChairID);
				return;
			}
			if (vecArg.length < 2)
				return;
			String strContent = vecArg[1];

			SUBCMD_S_Chat cmd = new SUBCMD_S_Chat();
			cmd.m_lUid = _Uid;
			cmd.m_wUserChairID = wChairID;
			cmd.szContent = strContent;

			SendData(Constants.INVALID_CHAIR, cmd.getJsonData());
		}	
		void Handle_InBack(int _Uid, String vecArg[]) {
			int wChairID = FindSeat(_Uid);
			if (wChairID == Constants.INVALID_CHAIR) {
				return;
			}
					
			SUBCMD_S_InBack cmd = new SUBCMD_S_InBack();
			cmd.byActionUser = wChairID;
			SendData(Constants.INVALID_CHAIR,cmd.getJsonData());
		}
		void Handle_InFore(int _Uid, String vecArg[]) {
			int wChairID = FindSeat(_Uid);
			if (wChairID == Constants.INVALID_CHAIR) {
				return;
			}
			
			SUBCMD_S_InFore cmd = new SUBCMD_S_InFore();
			cmd.byActionUser = wChairID;
			SendData(Constants.INVALID_CHAIR,cmd.getJsonData());
		}
		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		void Handle_onVoice(int _Uid, String vecArg[]) {
			int wChairID = FindSeat(_Uid);
			if (wChairID == Constants.INVALID_CHAIR) {
				// printf("Handle_onBiaoQing Error _Uid(%d)(%d)\n", _Uid, wChairID);
				return;
			}
			if (vecArg.length <5)
				return;
			int seconds = Constants.atoi(vecArg[1]);
			String strVoiceURL = vecArg[2];

			SUBCMD_S_Voice cmd = new SUBCMD_S_Voice();
			cmd.m_lUid = _Uid;
			cmd.m_wUserChairID = wChairID;
			cmd.seconds = seconds;
			cmd.szVoiceURL = strVoiceURL;

			SendData(Constants.INVALID_CHAIR, cmd.getJsonData());
		}	
		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
		void Handle_onVoiceMsg(int _Uid, String[] vecArg) {
			int wChairID = FindSeat(_Uid);
			if (wChairID == Constants.INVALID_CHAIR) {
				return;
			}
			float seconds = Float.parseFloat(vecArg[1]);

			SUBCMD_S_VoiceMsg cmd = new SUBCMD_S_VoiceMsg();
			cmd.m_lUid = _Uid;
			cmd.m_wUserChairID = wChairID;
			cmd.seconds = seconds;

			cmd.data = vecArg[2];
			cmd.m_maxClip = Integer.parseInt(vecArg[3]);
			cmd.m_currClip = Integer.parseInt(vecArg[4]);
			System.out.println("脙楼茂驴陆芒鈧溍兟┟⑩�毬柯矫兟偮偮兟┟吢该偮趁兟γ偮睹嬧�犆兟γ柯矫偮兟ッ吢矫偮幻兟ッ偮偮⒚兟γ嬧�犆偮访兟偮偮�");
			SendData(Constants.INVALID_CHAIR,cmd.getJsonData());
		}
		void Handle_onText(int _Uid, String[] vecArg) {

			int wChairID = FindSeat(_Uid);
			if (wChairID == Constants.INVALID_CHAIR) {
				return;
			}
			String strContent = vecArg[1];
			String iter = dthall.getInstance().m_mapAvatar.get(_Uid);				
			
			String szAvatarURL = "http://lamj.qilehuyu.cn/liuan-80.png";

			if(!StringUtils.isEmpty(iter)){
				m_vecInputWenZi+=iter+";"+_Uid+";"+strContent+",";
			}
			else{
				m_vecInputWenZi+=szAvatarURL+";"+_Uid+";"+strContent+",";
			}
			strContent = string_replace(strContent, "|", ".");
			strContent = string_replace(strContent, "#", ".");
			strContent = string_replace(strContent, ",", ".");
			strContent = string_replace(strContent, "\\", ".");
			strContent = string_replace(strContent, "'", ".");
			strContent = string_replace(strContent, "\"", ".");

			SUBCMD_S_Text cmd = new SUBCMD_S_Text();
			cmd.m_lUid = _Uid;
			cmd.m_wUserChairID = wChairID;
			cmd.szContent = strContent;
			cmd.InputWenZi=m_vecInputWenZi;
			SendData(Constants.INVALID_CHAIR,cmd.getJsonData());
		}
		private String string_replace(String strContent, String string, String string2) {
			return strContent.replace(string, string2);
		}
		
		// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮ッ兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮趁兤捗嗏�櫭冣�毭偮┟兤捗⑩偓拧脙鈥毭偮∶兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧γ冣�毭偮该兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮棵兤捗⑩偓拧脙鈥毭偮�
		void Handle_onTryDismissRoom(int _Uid, String vecArg[]) {
			int bySeatID = FindSeat(_Uid);
			if (bySeatID == Constants.INVALID_CHAIR) {
				// printf("Handle_onBiaoQing Error _Uid(%d)(%d)\n", _Uid, bySeatID);
				return;
			}
			if (vecArg.length < 2)
				return;
			String attachInfo = vecArg[1];
			if(attachInfo.equals("fzquit")){
				//�����������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
				OnEventGameEnd(0,null,Constants.GAME_END_DISMISS);
				DelayRemove();
				QpGameMgr.getInstance().OnDismissRoom(this);
				return;
			}
			int cntUser = 0;
			int cntOnline = 0;
			int cntOffline = 0;
			for (int i = 0; i <5; i++) {
				if (m_pIUserItem[i].dwUserID > 0 && m_pIUserItem[i].isAndroidUser == 0) {
					cntUser++;
				}
			}
			for (int i = 0; i <5; i++)
			{
				if (m_pIUserItem[i].dwUserID > 0 && m_pIUserItem[i].isAndroidUser == 0)
				{
					if (m_pIUserItem[i].cbOnline == Constants.US_OFFLINE)
					{
						cntOffline++;
					}
					else{
						cntOnline++;
					}
				}
			}		
			if (cntUser > 1) {
				if (m_dismissTimer == 0) {
					m_dismissTimer = Constants.time(null);
				}
				m_byAgreeDismiss[bySeatID] = 1;

				SUBCMD_S_TryDismissRoom cmd = new SUBCMD_S_TryDismissRoom();
				cmd.lUid = _Uid;
				cmd.dwTableID = m_dwTableID;
				cmd.szNickName = m_pIUserItem[bySeatID].szNickName;

				SendData(Constants.INVALID_CHAIR, cmd.getJsonData());
				
				if (cntOnline == 1)
				{
					OnEventGameEnd(0, null,Constants.GAME_END_DISMISS);
					DelayRemove();
					QpGameMgr.getInstance().OnDismissRoom(this);

					m_dismissTimer = 0;
				}			
			} else {
				OnEventGameEnd(0, null,Constants.GAME_END_DISMISS);
				DelayRemove();
				QpGameMgr.getInstance().OnDismissRoom(this);
			}

		}	
		
		void Handle_onAgreeDismissRoom(int _Uid, String vecArg[]) {
			int bySeatID = FindSeat(_Uid);
			if (bySeatID == Constants.INVALID_CHAIR) {
				// printf("Handle_onBiaoQing Error _Uid(%d)(%d)\n", _Uid, bySeatID);
				return;
			}
			if (vecArg.length < 2)
				return;
			m_byAgreeDismiss[bySeatID] = 1;

			SUBCMD_S_AgreeDismissRoom cmd = new SUBCMD_S_AgreeDismissRoom();
			cmd.lUid = _Uid;
			cmd.dwTableID = m_dwTableID;
			cmd.szNickName = m_pIUserItem[bySeatID].szNickName;

			SendData(Constants.INVALID_CHAIR, cmd.getJsonData());

			if (bySeatID == 0 && m_bTableStarted == false) {
				OnEventGameEnd(0, null,Constants.GAME_END_DISMISS);
				DelayRemove();
				QpGameMgr.getInstance().OnDismissRoom(this);
				return;
			}
			int cntAgree = 0;
			for (int i = 0; i <5; i++) {
				if (m_byAgreeDismiss[i] > 0) {
					cntAgree++;
				}
			}
			int cntUser = 0;
			for (int i = 0; i <5; i++) {
				if (m_pIUserItem[i].dwUserID > 0 && m_pIUserItem[i].isAndroidUser == 0) {
					cntUser++;
				}
			}
			if (cntAgree >= 2 && cntAgree >= cntUser - 1) {
				OnEventGameEnd(0, null,Constants.GAME_END_DISMISS);
				DelayRemove();
				QpGameMgr.getInstance().OnDismissRoom(this);

				if (ShouldBeRemoved()) {
					// niuniuTableMgr::instance().DismissTable(this);
				}
			}
		}
		
		void Handle_onChangPai(int _Uid, String vecArg[]) {
			firstround++;
			int wChairID = FindSeat(_Uid);
			if (GetGameStatus() != Constants.GS_WK_PLAYING){
				System.out.println("脙茠脗楼脙鈥γ偮矫兟⒚⑩�毬吢∶兤捗偮兟⒚⑩�毬偮懊冣�γ⑩偓鈩⒚兤捗偮γ兟⒚⑩�毬⑩偓锟矫冣�毭偮睹兤捗偮γ冣�毭偮该冣�毭偮该兤捗偮γ冣�姑⑩偓聽脙炉脗驴脗陆脙茠脗搂脙鈥γ偮犆冣�毭偮睹兤捗偮γ兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠脗漏脙垄芒鈥毬柯矫兟⒚⑩偓啪脗垄脙茠脗篓脙鈥毭偮冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�");
				return;
			}
				
			if ((wChairID != m_wCurrentUser)){
				System.out.println("脙茠脗楼脙鈥γ偮矫兟⒚⑩�毬吢∶兤捗偮兟⒚⑩�毬偮懊冣�γ⑩偓鈩⒚兤捗偮γ兟⒚⑩�毬⑩偓锟矫冣�毭偮睹兤捗偮冣�γ偮矫冣�毭偮┟兤捗偮ッ冣�毭偮冣�毭偮睹兤捗偮γ冣�毭偮っ兟⒚⑩�毬偮γ兤捗偮ッ冣�毭偮兟偮棵偮矫兤捗偮ッ兟偮棵偮矫冣�毭偮访兤捗偮っ冣�毭偮该兟偮棵偮矫兤捗偮ッ冣�毭偮冣�毭偮姑兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�");
				return;
			}
			if(wChairID == m_doguser){
				
				showdog = 1;
			}
				
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗⑩偓拧脙鈥毭偮Ｃ兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧∶冣�毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			MingPaiTimes*=2;
			isMingPai[m_wCurrentUser] =0;
			SelectMingPai[m_wCurrentUser] =1;
			m_wCurrentUser = (m_wCurrentUser + 1) % Constants.DDZ_PLAYER;	
			isMingPai[m_wCurrentUser] =1;
			
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			CMD_S_PassCard PassCard = new CMD_S_PassCard();

			PassCard.wPassUser = wChairID;
			PassCard.wCurrentUser = m_wCurrentUser;
			PassCard.bNewTurn = (m_bTurnCardCount == 0) ? 1 : 0;
			PassCard.changpaiuser = wChairID;
			PassCard.bCardData = m_bHandCardData[wChairID];
			PassCard.showdog = showdog;
			PassCard.dogchair = m_doguser;
			if(firstround>=5){
				PassCard.first =1;
			}else{
				PassCard.first = 0;
			}
			

			String sData = PassCard.getJsonData();
			SendTableData(Constants.INVALID_CHAIR, Constants.SUB_S_PASS_CARD, PassCard, 0, sData);

			return;
			
			
			
		}
		void Handle_onBuChangPai(int _Uid, String vecArg[]) {
			firstround++;
			int wChairID = FindSeat(_Uid);
			if (GetGameStatus() != Constants.GS_WK_PLAYING){
				System.out.println("脙茠脗陇脙鈥毭偮该兟偮棵偮矫兤捗偮ッ冣�γ偮矫兟⒚⑩�毬吢∶兤捗偮兟⒚⑩�毬偮懊冣�γ⑩偓鈩⒚兤捗偮γ兟⒚⑩�毬⑩偓锟矫冣�毭偮睹兤捗偮γ冣�毭偮该冣�毭偮该兤捗偮γ冣�姑⑩偓聽脙炉脗驴脗陆脙茠脗搂脙鈥γ偮犆冣�毭偮睹兤捗偮γ兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠脗漏脙垄芒鈥毬柯矫兟⒚⑩偓啪脗垄脙茠脗篓脙鈥毭偮冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�");
				return;
			}
				
			if ((wChairID != m_wCurrentUser)){
				System.out.println("脙茠脗陇脙鈥毭偮该兟偮棵偮矫兤捗偮ッ冣�γ偮矫兟⒚⑩�毬吢∶兤捗偮兟⒚⑩�毬偮懊冣�γ⑩偓鈩⒚兤捗偮γ兟⒚⑩�毬⑩偓锟矫冣�毭偮睹兤捗偮冣�γ偮矫冣�毭偮┟兤捗偮ッ冣�毭偮冣�毭偮睹兤捗偮γ冣�毭偮っ兟⒚⑩�毬偮γ兤捗偮ッ冣�毭偮兟偮棵偮矫兤捗偮ッ兟偮棵偮矫冣�毭偮访兤捗偮γ冣�毭偮犆冣�毭偮∶兤捗偮┟冣�毭偮冣�γ⑩偓鈩⒚兤捗偮┟兟⒚⑩�毬柯矫兟⒚⑩偓啪脗垄脙茠脗篓脙鈥毭偮冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�");
				return;
			}
				
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗⑩偓拧脙鈥毭偮Ｃ兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧∶冣�毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			isMingPai[m_wCurrentUser] =0;
			m_wCurrentUser = (m_wCurrentUser + 1) % Constants.DDZ_PLAYER;	
			isMingPai[m_wCurrentUser] =1;
			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
			CMD_S_PassCard PassCard = new CMD_S_PassCard();
			PassCard.wPassUser = wChairID;
			PassCard.wCurrentUser = m_wCurrentUser;
			PassCard.bNewTurn = (m_bTurnCardCount == 0) ? 1 : 0;
			PassCard.changpaiuser = -1;
			PassCard.bCardData = m_bHandCardData[wChairID];
			PassCard.buchangpai = 1;
			if(firstround>=5){
				PassCard.first =1;
			}else{
				PassCard.first = 0;
			}
			

			String sData = PassCard.getJsonData();
			SendTableData(Constants.INVALID_CHAIR, Constants.SUB_S_PASS_CARD, PassCard, 0, sData);

			return;
			
			
			
		}
		void Handle_onJiaoGouTui(int _Uid, String vecArg[]) {
			//鍐插紑灞� 瀹㈡埛绔奖钘忔墜鐗� 鐙楄吙flag 鏍囧織  鍦颁富鏍囪瘑 

			int wChairID = FindSeat(_Uid);			
			if (GetGameStatus() != Constants.GS_WK_PLAYING){
				return;
			}
				
			if ((wChairID != m_wCurrentUser)){
				return;
			}
		
			isjiaogoutui = 0;
			
			isMingPai[wChairID] =1;
			int temp1 = 0;
			int temp2 = 0;
			int carddata[]=new int[38];
			int carddata1[]=new int[38];
			int carddata2[]=new int[38];
			int carddata3[]=new int[38];
			int result[] = new int[4];
			 result[0] = 0;
			 result[1] = 0;
			 result[2] = 0;
			 result[3] = 0;
			Constants.ZeroMemory(carddata);
			Constants.ZeroMemory(carddata1);
			Constants.ZeroMemory(carddata2);
			Constants.ZeroMemory(carddata3);
			for(int i = 0;i<38;i++){
				switch(m_bHandCardData[wChairID][i]/16){
				case 0:for(int j =0;j<38;j++){
					if(carddata[j]==0){
						carddata[j]=m_bHandCardData[wChairID][i];	
						break;
					}					
				}	break;
				case 1:for(int j =0;j<38;j++){	
					if(carddata1[j]==0){
						carddata1[j]=m_bHandCardData[wChairID][i];
						break;
					}												
				}	break;
				case 2:for(int j =0;j<38;j++){
					if(carddata2[j]==0){
						carddata2[j]=m_bHandCardData[wChairID][i];	
						break;
					}					
				}	break;
					
				case 3:for(int j =0;j<38;j++){
					if(carddata3[j]==0){
						carddata3[j]=m_bHandCardData[wChairID][i];
						break;
					}					
				}	break;							
				}
				
			}

			
			for(int i = 0;i<carddata.length-2;i++){
				if((carddata[i]%16==carddata[i+1]%16)&&(carddata[i+1]%16==carddata[i+2]%16)){
					if((i+2)<(carddata.length-2)){
						i+=2;
					}
				}                                   
				if((carddata[i]%16==carddata[i+1]%16)&&(carddata[i+1]%16!=carddata[i+2]%16)){
					if(i>1){
						if(carddata[i]==carddata[i-1]){
							continue;
						}
					}
					if(carddata[i]%16==2){
						continue;
					}else if(carddata[i]%16==1){
						temp1=998;
					}else{
						temp1=carddata[i]%16;
					}
					if(temp1>temp2){
						temp2 = temp1;
						result[0] = carddata[i];
					}
					
					break;
				}
			}
			for(int i = 0;i<carddata1.length-2;i++){
				if((carddata[i]%16==carddata1[i+1]%16)&&(carddata1[i+1]%16==carddata1[i+2]%16)){
					if((i+2)<(carddata1.length-2)){
						i+=2;
					}
				}
			
				if((carddata1[i]%16==carddata1[i+1]%16)&&(carddata1[i+1]%16!=carddata1[i+2]%16)){
					if(i>1){
						if(carddata1[i]==carddata1[i-1]){
							continue;
						}
					}
					if(carddata1[i]%16==2){
						continue;
					}else if(carddata1[i]%16==1){
						temp1=998;
					}else{
						temp1=carddata1[i]%16;
					}
					if(temp1>temp2){
						temp2 = temp1;
						result[1] = carddata1[i];
						}
					
					break;
				}
			}
			for(int i = 0;i<carddata2.length-2;i++){
				if((carddata2[i]%16==carddata2[i+1]%16)&&(carddata2[i+1]%16==carddata2[i+2]%16)){
					if((i+2)<(carddata2.length-2)){
						i+=2;
					}
				}
				
				if((carddata2[i]%16==carddata2[i+1]%16)&&(carddata2[i+1]%16!=carddata2[i+2]%16)){
					if(i>1){
						if(carddata2[i]==carddata2[i-1]){
							continue;
						}
					}
					if(carddata2[i]%16==2){
						continue;
					}else if(carddata2[i]%16==1){
						temp1=998;
					}else{
						temp1=carddata2[i]%16;
					}
					if(temp1>temp2){
						temp2 = temp1;
						result[2] = carddata2[i];
					}
					
					break;
				}
			}
			for(int i = 0;i<carddata3.length-2;i++){
				if((carddata3[i]%16==carddata3[i+1]%16)&&(carddata3[i+1]%16==carddata3[i+2]%16)){
					if((i+2)<(carddata3.length-2)){
						i+=2;
					}
				}
				
				if((carddata3[i]%16==carddata3[i+1]%16)&&(carddata3[i+1]%16!=carddata3[i+2]%16)){
					if(i>1){
						if(carddata3[i]==carddata3[i-1]){
							continue;
						}
					}
					if(carddata3[i]%16==2){
						continue;
					}else if(carddata3[i]%16==1){
						temp1=998;
					}else{
						temp1=carddata3[i]%16;
					}
					if(temp1>temp2){
						temp2 = temp1;
						result[3] = carddata3[i];
					}
					
					break;
				}
			}
			
			if((result[0]==0)&&(result[1]==0)&&(result[2]==0)&&(result[3]==0)){
				OnEventGameEnd(wChairID,null,999);
				return;
			}
			
			
			int tempidx = 0;
			 
			for (int i = 0; i < 3; ++i){
				tempidx = (result[tempidx]%16 > result[i+1]%16 ) ? tempidx : i+1;
			}
			jiaogoutui = result[tempidx];
			System.out.println("tellgoutui/jiaogoutui"+jiaogoutui);

			for (int i = 0; i < Constants.DDZ_PLAYER; i++) {				
				for(int j = 0;j<31;j++){
					if(m_bHandCardData[i][j]==jiaogoutui){
						if(i!=wChairID){
							m_doguser = i;	
							System.out.println("tellgoutui/doguser"+m_doguser);
							break;
						}
						
									
					}
				}
			}
				
			CMD_S_JiaoGouTui GouTui = new CMD_S_JiaoGouTui();
			GouTui.jiaogoutui = jiaogoutui;
			GouTui.wCharID = m_doguser;

			

			String sData = GouTui.getJsonData();
			SendTableData(Constants.INVALID_CHAIR, Constants.SUB_S_JIAOGOUTUI, GouTui, 0, sData);

			return;
			
			
			
		}
		void Handle_onvsFour(int _Uid, String vecArg[]) {
			int wChairID = FindSeat(_Uid);
			isjiaogoutui = 0;
			isMingPai[wChairID] =1;
			OneVsFour = true;
			CMD_S_PlayerGouTui playerGouTui = new CMD_S_PlayerGouTui();
			playerGouTui.chairID = -1;	
			playerGouTui.onevsfour = 1;			
			String sData = playerGouTui.getJsonData();
			SendTableData(Constants.INVALID_CHAIR, Constants.SUB_S_PLAYERGOUTUI, playerGouTui, 0, sData);
//			firstround++;
//			int wChairID = FindSeat(_Uid);
//			if (GetGameStatus() != Constants.GS_WK_PLAYING)
//				return;
//			if ((wChairID != m_wCurrentUser))
//				return;
//			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗⑩偓拧脙鈥毭偮兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗⑩偓拧脙鈥毭偮Ｃ兤捗嗏�櫭冣�毭偮ッ兤捗偮⒚兟⒚⑩偓拧脗卢脙炉脗驴脗陆脙茠芒鈧∶冣�毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
//			m_wCurrentUser = (m_wCurrentUser + 1) % Constants.DDZ_PLAYER;				
//			// 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮�
//			CMD_S_PassCard PassCard = new CMD_S_PassCard();
//			PassCard.wPassUser = wChairID;
//			PassCard.wCurrentUser = m_wCurrentUser;
//			PassCard.bNewTurn = (m_bTurnCardCount == 0) ? 1 : 0;
//			if(firstround>=5){
//				PassCard.first =1;
//			}else{
//				PassCard.first = 0;
//			}
//
//			String sData = PassCard.getJsonData();
//			SendTableData(Constants.INVALID_CHAIR, Constants.SUB_S_PASS_CARD, PassCard, 0, sData);
//
//			return;
			
			
			
		}
		
		void Handle_onRefuseDismissRoom(int _Uid, String vecArg[]) {
			int bySeatID = FindSeat(_Uid);
			if (bySeatID == Constants.INVALID_CHAIR) {
				// printf("Handle_onBiaoQing Error _Uid(%d)(%d)\n", _Uid, bySeatID);
				return;
			}
			if (vecArg.length < 2)
				return;

			m_dismissTimer = 0;
			m_byAgreeDismiss[0] = 0;
			m_byAgreeDismiss[1] = 0;
			m_byAgreeDismiss[2] = 0;
		
			SUBCMD_S_RefuseDismissRoom cmd = new SUBCMD_S_RefuseDismissRoom();
			cmd.lUid = _Uid;
			cmd.dwTableID = m_dwTableID;
			cmd.szNickName = m_pIUserItem[bySeatID].szNickName;

			SendData(Constants.INVALID_CHAIR, cmd.getJsonData());
		}
	
	public boolean SendData(int wChairID, String sData) {
		// �������������������������������������������������������������������������������������
		if (wChairID == Constants.INVALID_CHAIR) {
			for (short i = 0; i < m_pIUserItem.length; i++) {
				if (m_pIUserItem[i].dwUserID > 0) {
					if (m_pIUserItem[i].isAndroidUser == 0) {
						dthall.getInstance().onSend(m_pIUserItem[i].dwUserID, sData);
					} else {
						// mPlayers[i].SendGameMessage(wSubCmdID, pData,
						// wDataSize, data);
					}
				}
			}

			return true;
		} else {
			if (wChairID >= m_pIUserItem.length) {
				dthall.getInstance().onSend(wChairID, sData);
			} else if (m_pIUserItem[wChairID].dwUserID > 0) {
				if (m_pIUserItem[wChairID].isAndroidUser == 0) {
					dthall.getInstance().onSend(m_pIUserItem[wChairID].dwUserID, sData);
				} else {
				}
				return true;
			}
		}

		return false;
	}
	
	void onLogin(int uid) {
		SHMUser user = null;
		if ((user = dthall.getInstance().getUserInfo(uid)) != null) {
			Packet_LoginResult rData = new Packet_LoginResult();
			rData.m_wMsgType = Constants.PktID_LoginResult;
			rData.UserData.dwUserID = uid;
			rData.UserData.szName = user.getNickName(null);
			rData.UserData.lScore = user.getCoin(0);
			String jsonData = rData.getJsonData();
			onSend(user.getUid(), jsonData);
		}
	}
	public int OnDealDt = 0;
	@Override
	public void OnDeal(int dt) {
		OnDealDt += dt;
		if (OnDealDt > 1) {
			int  dtInt = (int)OnDealDt;
			Update(dtInt);
			OnDealDt -= dtInt;
		}
	}
	public int m_DealTime = 0;
	@Override
	public int getDealTime() {
		return m_DealTime;
	}

	@Override
	public String getRoomInfo() {
		// TODO 脙茠脝鈥櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮好兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈧久偮⒚兤捗偮冣�毭偮棵冣�毭偮矫兤捗嗏�櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮久兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮兤捗⑩偓拧脙鈥毭偮济兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓拧脙鈥毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗嗏�櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥姑呪�溍兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗⑩偓拧脙鈥毭偮该兤捗嗏�櫭冣�毭偮γ兤捗⑩偓娄脙鈥毭偮久兤捗⑩偓拧脙鈥毭偮幻兤捗嗏�櫭冣�毭偮┟兤捗⑩偓娄脙鈥毭偮矫兤捗⑩偓拧脙鈥毭偮访兤捗嗏�櫭冣�毭偮兤捗⑩偓聽脙垄芒鈥毬⑩�灺⒚兤捗⑩偓拧脙鈥毭偮矫兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮⒚兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ⑩偓艙脙茠脝鈥櫭冣�毭偮┟兤捗偮冣�毭偮棵冣�毭偮矫兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮Ｃ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮犆兤捗嗏�櫭冣�毭偮ッ兤捗⑩偓拧脙鈥毭偮兤捗⑩偓拧脙鈥毭偮姑兤捗嗏�櫭冣�毭偮┟兤捗偮⒚兟⒚⑩偓拧脗卢脙垄芒鈥毬呪�溍兤捗⑩偓拧脙鈥毭偮棵兤捗嗏�櫭冣�毭偮兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮∶兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥γ偮∶兤捗嗏�櫭冣�毭偮γ兤捗偮⒚兟⒚⑩偓拧脗卢脙鈥毭偮姑兤捗⑩偓拧脙鈥毭偮�
		return null;
	}

	@Override
	public int getPlayerCount() {
		int cntPlayer = 0;
		for (int i = 0; i <5; i++) {
			if (m_pIUserItem[i].dwUserID > 0) {
				cntPlayer++;
			}
		}
		return cntPlayer;
	}

	@Override
	public int getCostGem() {
		return m_byCostGem;
	}

	@Override
	public int getStatus() {
		if(m_bGameStarted == false)
		{
			return 0;
		}
		return 1;
	}

	@Override
	public String getRoomDesc() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int getCellScore() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public int getMinScore() {
		// TODO Auto-generated method stub
		return 0;
	}


	@Override
	public String getPayway() {
		// TODO Auto-generated method stub
		return m_payWay;
	}
	@Override
	public String GetRoundInfo() {
		return "" + m_byRound + "/" +  m_byMaxRound;
	}


}
